Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - SQL Reference » Using SQL » SQL language elements » Expressions » Compatibility of expressions

 

The quoted_identifier option

SQL Anywhere provides a quoted_identifier option that allows the interpretation of delimited strings to be changed. By default, the quoted_identifier option is set to On in SQL Anywhere. See quoted_identifier option [compatibility].

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.

Setting the option

The following statement changes the setting of the quoted_identifier option to On:

SET quoted_identifier On;

The following statement changes the setting of the quoted_identifier option to Off:

SET quoted_identifier Off;
Compatible interpretation of delimited strings

You can choose to use either the SQL/2003 or the default Transact-SQL convention in SQL Anywhere as long as the quoted_identifier option is set to the same value in each DBMS.

Examples

If you choose to operate with the quoted_identifier option On (the default setting), then the following statements involving the SQL keyword user are valid for both DBMSs.

CREATE TABLE "user" ( col1 char(5) ) ;
INSERT "user" ( col1 )
   VALUES ( 'abcde' );

If you choose to operate with the quoted_identifier option off then the following statements are valid for both DBMSs.

SELECT *
FROM Employees
WHERE Surname = "Chin":