Progress
SQL-92
Guide and Reference


Delimited Identifiers

Delimited identifiers are strings of no more than 32 ASCII characters enclosed in double quotation marks ( “ ” ). Enclosing a name in double quotation marks preserves the case of the name and allows it to be a reserved word or to contain special characters. Special characters are any characters other than letters, digits, or the underscore character. Subsequent references to a delimited identifier must also use enclosing double quotation marks. To include a double quotation mark character in a delimited identifier, precede it with another double quotation mark.

NOTE: Although delimited identifiers preserve case for display purposes, case is still ignored for name matching. All of the following would refer to the same table: “Order”, “order”, Order, order. However, if the table were created using “Order”, it would display as written. With conventional identifiers, a table created as Order would display as ORDER.

NOTE: This behavior differs from the SQL-92 standard, which requires delimited identifiers to be case-sensitive.

The following SQL example shows some ways to create and refer to delimited identifiers:

-- Delimited Identifiers, in double quotes
-- 1st column name is: "
-- 2nd column name is: _under
-- 3rd column name is: "quotes
-- 4th column name is the word space preceded by a space
CREATE TABLE "delimited ids"   
          (
          """"       char(10),
          "_under"   char(10),
          """quotes" char(10),
          " space"   char(10)
          );
Update count = 0.
 
INSERT INTO "delimited ids" values(’string1’, ’string2’, ’string3’, 
’string4’);
Update count = 1.
 
INSERT INTO "delimited ids" values(’string5’, ’string6’, ’string7’, 
’string8’);
Update count = 1.
 
COMMIT WORK;
 
SELECT * from "delimited ids";
 
"                _under           "quotes           space           
---------------- ---------------- ---------------- ---------------- 
string1          string2           string3         string4
string5            string6             string7          string8 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095