The quoted_identifier option
Setting the option
Compatible
interpretation of
delimited strings
Examples
Adaptive Server Anywhere employs the SQL/92 convention, that strings
enclosed in apostrophes are constant expressions, and strings enclosed in
quotation marks (double quotes) are delimited identifiers (names for database
objects). Adaptive Server Enterprise employs the convention that strings
enclosed in quotation marks are constants, while delimited identifiers are not
allowed by default and are treated as strings.
Both Adaptive Server Enterprise and Adaptive Server Anywhere provide a
quoted_identifier option that allows the interpretation of delimited strings to
be changed. By default, the quoted_identifier option is set to OFF in
Adaptive Server Enterprise, and to ON in Adaptive Server Anywhere.
You cannot use SQL reserved words as identifiers if the quoted_identifier
option is off.
$
For a complete list of reserved words, see "Reserved words" on
page 220.
While the Transact-SQL SET statement is not supported for most Adaptive
Server Enterprise connection options, it is supported for the
quoted_identifier option.
The following statement in either Adaptive Server Anywhere or Adaptive
Server Enterprise changes the setting of the quoted_identifier option to ON:
SET quoted_identifier ON
With the quoted_identifier option set to ON, Adaptive Server Enterprise
allows table, view, and column names to be delimited by quotes. Other
object names cannot be delimited in Adaptive Server Enterprise.
The following statement in Adaptive Server Anywhere or Adaptive Server
Enterprise changes the setting of the quoted_identifier option to OFF:
SET quoted_identifier OFF
You can choose to use either the SQL/92 or the default Transact-SQL
convention in both Adaptive Server Enterprise and Adaptive Server
Anywhere as long as the quoted_identifier option is set to the same value in
each DBMS.
If you choose to operate with the quoted_identifier option on (the default
Adaptive Server Anywhere setting), then the following statements involving
the SQL keyword user are valid for both DBMS's.
CREATE TABLE "user" (
col1 char(5)
) ;
INSERT "user" ( col1 )
Chapter 6 SQL Language Elements
237
Need help?
Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?
Questions and answers