Derby Database Table Column Name Format Inconsistent in Query

拥有回忆 提交于 2019-12-01 23:03:25

Putting a tablename or column name in quotes, sometimes referred to by the jargon-y term "delimited identifiers" does two things:

  1. Allows you to use words that are otherwise reserved keywords (e.g., naming a column "WHERE" or "SELECT")
  2. Instructs the database system to process the name using case sensitive rules, rather than case-insensitive rules

So if you originally created "table3" with a CREATE TABLE statement that specified "table3" in double quotes like this, then you will forever after have to refer to it with the name in double quotes.

select * from table3

will be automatically processed by the database as if it was

select * from TABLE3

while

select * from "table3"

will successfully match the table you created as create table "table3"

See: http://db.apache.org/derby/docs/10.9/ref/crefsqlj34834.html

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!