1、概述
1.1 标识符无效
- 保留字(reserved = ‘Y’)是不能被用作 列名 的
- 关键字(reserved = ‘N’)虽然可以用作 列名,但Oracle 并不建议。
SELECT t.reserved FROM v$reserved_words t WHERE t.keyword = 'DESC';
RESERVED
Y
2、数据字典 v$reserved_words
Oracle 12c - 官方文档 - v$reserved_words 详解
Column | Description | 理解 |
---|---|---|
KEYWORD | Name of the keyword | |
LENGTH | Length of the keyword | |
RESERVED | Indicates whether the keyword cannot be used as an identifier (Y) or whether the keyword is not reserved (N) | |
RES_TYPE | Indicates whether the keyword cannot be used as a type name (Y) or whether the keyword is not reserved (N) |
|
RES_ATTR | Indicates whether the keyword cannot be used as an attribute name (Y) or whether the keyword is not reserved (N) |
|
RES_SEMI | Indicates whether the keyword is not allowed as an identifier in certain situations, such as in DML (Y) or whether the keyword is not reserved (N) | |
DUPLICATE | Indicates whether the keyword is a duplicate of another keyword (Y) or whether the keyword is not a duplicate (N) |