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

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » SQL Language Elements » Expressions » Compatibility of expressions

Compatibility of expressions Next Page

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 in SQL Anywhere changes the setting of the quoted_identifier option to On:

SET quoted_identifier On

The following statement in SQL Anywhere 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 SQL Anywhere 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"