v$reserved_words 保留字

      在用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.

ColumnDatatypeDescription
KEYWORDVARCHAR2(30)Name of the keyword
LENGTHNUMBERLength of the keyword
RESERVEDVARCHAR2(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_TYPEVARCHAR2(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_ATTRVARCHAR2(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_SEMIVARCHAR2(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.
DUPLICATEVARCHAR2(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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23650854/viewspace-687726/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值