Oraclehas several reserved words and these keywords can't be used in different places like naming in identifier or in attribute.
The v$reserved_words view show a list of reserved keywords in oracle.
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)
The RESERVED field value Y indicates that the corresponding row is always reserved and hence we can't name in anywhere in oracle as it's name.
If the RESERVED field value is N then it indicates that the keyword is not always reserved and hence can be used based on RES_TYPE, RES_ATTR, RES_SEMI value.
There are four kinds of Reserved objects:
Oracle Reserved Words have a special meaning to Oracle and they cannot be redefined to name database objects such as columns, tables, or indexes.
Oracle Keywords also have a special meaning to Oracle but are not reserved words and so can be redefined. However, some might eventually become reserved words.
PL/SQL Reserved Words are those that may require special treatment when used in embedded SQL statements
Oracle Reserved Namespaces are reserved by Oracle. The function names in Oracle libraries have initial characters which are restricted to the following strings. To avoid potential name conflicts, do not use function names that begin with these characters.
Namespace - Library
O - OCI functions
S - function names from SQLLIB and system-dependent libraries
XA - external functions for XA applications only
GEN KP L NA NC ND NL NM NR NS NT NZ TTC - UPI Internal functions
The v$reserved_words view show a list of reserved keywords in oracle.
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)
The RESERVED field value Y indicates that the corresponding row is always reserved and hence we can't name in anywhere in oracle as it's name.
If the RESERVED field value is N then it indicates that the keyword is not always reserved and hence can be used based on RES_TYPE, RES_ATTR, RES_SEMI value.
There are four kinds of Reserved objects:
- Oracle Reserved Words
- Oracle Keywords
- PL/SQL Reserved Words
- Oracle Reserved Namespaces
Oracle Reserved Words have a special meaning to Oracle and they cannot be redefined to name database objects such as columns, tables, or indexes.
Oracle Keywords also have a special meaning to Oracle but are not reserved words and so can be redefined. However, some might eventually become reserved words.
PL/SQL Reserved Words are those that may require special treatment when used in embedded SQL statements
Oracle Reserved Namespaces are reserved by Oracle. The function names in Oracle libraries have initial characters which are restricted to the following strings. To avoid potential name conflicts, do not use function names that begin with these characters.
Namespace - Library
O - OCI functions
S - function names from SQLLIB and system-dependent libraries
XA - external functions for XA applications only
GEN KP L NA NC ND NL NM NR NS NT NZ TTC - UPI Internal functions