quoted_identifier

Specifies whether to enable or disable delimited identifiers.

Delimited identifiers are object names enclosed in double quotes. You can use them to avoid certain restrictions on object names. You can delimit only table, view, and column names.

Delimited identifiers can:
  • Be reserved words

  • Begin with non alphabetic characters

  • Include characters that ordinarily are not allowed

Syntax

quoted_identifer = [on | off]

Default

off

Values

  • on means that a quoted string used as an identifier is recognized.

  • off means that a quoted string is not recognized as an identifier.

Comments

  • Delimited identifiers follow the conventions for identifiers for DB2.

  • Before you create or reference a delimited identifier, issue:
    set quoted_identifier on

Example 1

Each time you use the delimited identifier in a statement, you must enclose it in double quotes.

create table “1one” (col 1 char(3))
 create table “include spaces” (col1 int)
or:
create table “grant” (“add” int)
 insert into “grant” (“add”) values (3)

When the quoted_identifier configuration property is set to on, use single quotes around character or date strings. Delimiting strings with double quotes causes Adaptive Server to treat them as identifiers.

Example 2

Inserts a character string into col1 of 1one when the quoted identifier “1one” is set to on:
insert into “1one”(col1) values (‘abc’)

Example 3

Inserts a single quote into a column, use two consecutive single quotation marks and values “a’b” into col1

insert “1one”(col1) values(‘a”b’)