Sometimes we use the same name as the Oracle keyword when we define field names and aliases, so how do we handle them?
It's really simple, just add "" To this keyword, like "group"
Sql>DROP TABLE k; Table dropped--CREATE table K, field named UID (Oracle keyword) SQL>CREATE TABLE K (UID INT); CREATE TABLE K (UID INT) ORA-00904:: Invalid IDENTIFIER--Field name plus""table Create Successful SQL> CREATE TABLE k ("UID"INT); Table created--insert some data SQL> INSERT into K VALUES (1);1Row Insertedsql> INSERT into K VALUES (2);1Row Insertedsql> INSERT into K VALUES (3);1Row Inserted--The query is not added""are normal (not likely to conform to specification) SQL>SELECT UID from K; UID----------555SQL> SELECT"UID"From K; UID---------------------------------------123--must be added when update""SQL> UPDATE k SET uid=5WHERE uid=3; UPDATE k SET UID=5WHERE uid=3ORA-01747: Invalid User.table.column, table.column, or column Specificationsql> UPDATE k SET"UID"=5WHERE"UID"=3;
1 row UPDATED
Summary : Oracle can refer to keywords as aliases for field names and query statements in the form of keywords. If it is not a special case, it is best not to use it to avoid errors in the code writing process.
Oracle keyword use as field name method