ITPub博客

首页 > Linux操作系统 > Linux操作系统 > v$reserved_words 保留字

v$reserved_words 保留字

原创 Linux操作系统 作者:zecaro 时间:2011-02-22 21:49:06 0 删除 编辑

      在用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  ;
 
KEYWORD                            LENGTH R R R R D                           
------------------------------ ---------- - - - - -                           
!                                       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
 
 
 
另外,
 
PL/SQL reserved words分两类
  • keywords words  可以作为identifiers使用,但不推荐
  • reserved words   无法作为identifiers使用

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23650854/viewspace-687726/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-10-28

  • 博文量
    182
  • 访问量
    348653