How do I escape a reserved word in Oracle?

Answer

Oracle normally requires double-quotes to delimit the name of identifiers in SQL statements, e.g.

SELECT"MyColumn"AS"MyColAlias"FROM"MyTable"AS"Alias"WHERE"ThisCol"='That Value';

However, it graciously allows omitting the double-quotes, in which case it quietly converts the identifier to uppercase:

SELECT MyColumn AS MyColAlias
FROM MyTable AS Alias
WHERE ThisCol ='That Value';

gets internally converted to something like:

SELECT"ALIAS"."MYCOLUMN"AS"MYCOLALIAS"FROM"THEUSER"."MYTABLE"AS"ALIAS"WHERE"ALIAS"."THISCOL"='That Value';

All oracle Questions

Ask your interview questions on oracle

Write Your comment or Questions if you want the answers on oracle from oracle Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---