Call Level Interface Guide and Reference

Case Sensitivity of Object Identifiers

All database object (tables, views, columns etc.) identifiers are stored in the catalog tables in upper case unless the identifier is delimited. If an identifier is created using a delimited name, the exact case of the name is stored in the catalog tables.

When an identifier is referenced within an SQL statement, it is treated as case insensitive unless it is delimited.

For example, if the following two tables are created,

  CREATE TABLE MyTable   (id INTEGER)
  CREATE TABLE "YourTable" (id INTEGER)

two tables will exist, MYTABLE and YourTable

Both of the following statements are equivalent:

  SELECT * FROM MyTable (id INTEGER)
  SELECT * FROM MYTABLE (id INTEGER)

The second statement below will fail with TABLE NOT FOUND since there is no table named YOURTABLE:

  SELECT * FROM "YourTable" (id INTEGER)   // executes without error
  SELECT * FROM YourTable (id INTEGER)     // error, table not found

All DB2 CLI catalog function arguments treat the names of objects as case sensitive, that is, as if each name was delimited.


[ Top of Page | Previous Page | Next Page ]