Delimited identifiers are object names enclosed in double quotes. Using delimited identifiers allows you to avoid certain restrictions on object names.
You can use double quotes to delimit table, view, and column names; you cannot use them for other database objects.
Delimited identifiers can be reserved words, can begin with nonalphabetic characters, and can include characters that would not otherwise be allowed. They cannot exceed 253 bytes. A pound sign (#) is illegal as a first character of any quoted identifier.
Before you create or reference a delimited identifier, execute:
set quoted_identifier on
This allows SAP ASE to recognize delimited identifiers. Each time you use the quoted identifier in a statement, you must enclose it in double quotes. For example:
create table "1one"(col1 char(3)) select * from "1one" create table "include spaces" (col1 int)
While the quoted_identifier option is turned on, use single quotes around character or date strings. Delimiting these strings with double quotes causes SAP ASE to treat them as identifiers. For example, to insert a character string into col1 of 1onetable, use:
insert "1one"(col1) values ('abc')
rather than:
insert "1one"(col1) values ("abc")
To insert a single quote into a column, use two consecutive single quotation marks. For example, to insert the characters “a’b” into col1, use:
insert "1one"(col1) values('a''b')
When you set the quoted_identifier option to on for a session, use double quotes to delimit object names that may cause syntax errors. Use single quotes for character strings. When you set the quoted_identifier option to off for a session (the default), use double or single quotes to delimit character strings (you cannot quote identifiers).
set quoted identifier on go create table "1one" (c1 int)
select object_id('1one')
----------------------- 896003192
create table "embedded""quote" (c1 int)
However, you need not double the quote when the statement syntax requires the object name to be expressed as a string:
select object_id('embedded"quote')
Bracketed identifiers are supported. The behavior is identical to that of quoted identifiers, with the exception that you need not set the quoted_identifier option to on to use them.
create table [bracketed identifier](c1 int)
Support for brackets with delimited identifiers increases platform compatibility.