Oracle:处理名为 COMMENT 的字段
我有一个表,其中有一个名为 COMMENT 的字段,该字段似乎是保留字。
使用 SQLDeveloper,如果我尝试:
select
[COMMENT],
another_field
FROM table_created_by_idiot_developer
我得到
SQL Error: ORA-00936: missing expression
How can I access this field in my select in SQL Developer? (这是 SQL Developer 的问题,还是 Oracle 中不应将字段命名为 COMMENT?)
I have a table with a field named COMMENT, which appears to be a reserved word.
Using SQLDeveloper, if I try:
select
[COMMENT],
another_field
FROM table_created_by_idiot_developer
I get
SQL Error: ORA-00936: missing expression
How can I access this field in my select in SQL Developer? (Is this a problem with SQL Developer, or should field not be named COMMENT in oracle?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用
"COMMENT"
而不是[COMMENT]
。这是各种 DBMS 普遍接受的替代语法。我使用此语法来引用 SQLite 中名称中包含点或 UTF8 字符的列。Try
"COMMENT"
instead of[COMMENT]
. This is alternate syntax commonly accepted by various DBMSes. I have used this syntax to refer to columns having dots or UTF8 characters in their names in SQLite.