DATE
is an SQL Reserved Word and TIME
is a PL/SQL Reserved Word in Oracle (listed in SQL> HELP RESERVED WORDS
). What problems would using them as column names cause in Oracle?
The database server runs:
naming conventionoraclereserved-word
DATE
is an SQL Reserved Word and TIME
is a PL/SQL Reserved Word in Oracle (listed in SQL> HELP RESERVED WORDS
). What problems would using them as column names cause in Oracle?
The database server runs:
Best Answer
The answer to your question is that it won't let you.
Oracle is stricter than other RDBMSes and you'll get an
ORA-00904: invalid identifier
if you try aCREATE TABLE
with a reserved word.However, you can force it to do so by surrounding the name in quotes, for example:
... But in doing so, you're essentially admitting you're doing something wrong (plus it makes the name case-sensitive).
Best practice would be to avoid case-sensitive object names, and avoid using reserved words.
Documentation link here, with a list of reserved words, which backs up what I've stated:
In summary: Just don't.