Can I Escape Double Quotes In Column Titles With Oracle?
Creating a table with a double quote to escape the real double quote doesn't seem to work in Oracle's SQL syntax: CREATE TABLE 'MyTable' ( 'Col''umn 1' varchar(168) ); The above f
Solution 1:
You can not. According to the documentation:
Nonquoted identifiers can contain only alphanumeric characters from your database character set and the underscore (_), dollar sign ($), and pound sign (#). Database links can also contain periods (.) and "at" signs (@). Oracle strongly discourages you from using $ and # in nonquoted identifiers.
Quoted identifiers can contain any characters and punctuations marks as well as spaces. However, neither quoted nor nonquoted identifiers can contain double quotation marks or the null character (\0).
Solution 2:
You could, of course, use unicode!
SELECT1 "“Unicode Rocks”",
2 "ʺSooo cooolʺ",
3 ""My co-workers love me""
FROM DUAL
Solution 3:
Maybe this will help... But please DO NOT create tables with such columns:
CREATETABLE DropMe ASSELECT rpad('X', 168, ' ') "Col''umn1" FROM dual
/SELECT*FROM DropMe
/SQL>
Col"umn1
-------------------------------------.....
X
Post a Comment for "Can I Escape Double Quotes In Column Titles With Oracle?"