在用toad建schema的时候,发现toad有颜色显示,估计是数据库的保留字,所以特意查了一下,果然如此,mark~ |
v$reserved_words
SQL> desc v$reserved_words
Name Null? Type
----------------------------------------- -------- ----------------------------
KEYWORD VARCHAR2(30)
LENGTH NUMBER
RESERVED VARCHAR2(1)
RES_TYPE VARCHAR2(1)
RES_ATTR VARCHAR2(1)
RES_SEMI VARCHAR2(1)
DUPLICATE VARCHAR2(1)
SQL> select * from v$reserved_words
2 order by keyword
3 ;
------------------------------ ---------- - - - - -
! 1 Y N N N N
& 1 Y N N N N
This view gives a list of all SQL keywords. To determine whether a particular keyword is reserved in any way, check the RESERVED, RES_TYPE, RES_ATTR, and RES_SEMI columns.
Column | Datatype | Description |
---|---|---|
KEYWORD | VARCHAR2(30) | Name of the keyword |
LENGTH | NUMBER | Length of the keyword |
RESERVED | VARCHAR2(1) | A value of Y means that the keyword cannot be used as an identifier. A value of N means that it is not reserved. |
RES_TYPE | VARCHAR2(1) | A value of Y means that the keyword cannot be used as a type name. A value of N means that it is not reserved. |
RES_ATTR | VARCHAR2(1) | A value of Y means that the keyword cannot be used as an attribute name. A value of N means that it is not reserved. |
RES_SEMI | VARCHAR2(1) | A value of Y means that the keyword is not allowed as an identifier in certain situations, such as in DML. A value of N means that it is not reserved. |
DUPLICATE | VARCHAR2(1) | A value of Y means th |
- keywords words 可以作为identifiers使用,但不推荐
- reserved words 无法作为identifiers使用
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23650854/viewspace-687726/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/23650854/viewspace-687726/