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 Statements

SET statement Next Page

SET statement [T-SQL]

Use this statement to set database options for the current connection in an Adaptive Server Enterprise-compatible manner.


SET option-name option-value


The available options are as follows:

Option name Option value
ansinull On or Off
ansi_permissions On or Off
close_on_endtrans On or Off

1, 2, 3, 4, 5, 6, or 7

The setting of this option affects the DATEPART function when obtaining a weekday value.

For more information about specifying the first day of the week, see first_day_of_week option [database] and DATEPART function [Date and time].

quoted_identifier On | Off
rowcount integer
self_recursion On | Off
string_rtruncation On | Off
textsize integer
transaction isolation level 0, 1, 2, 3, snapshot, statement snapshot, or read only statement snapshot

Database options in SQL Anywhere are set using the SET OPTION statement. However, SQL Anywhere also provides support for the Adaptive Server Enterprise SET statement for options that are particularly useful for compatibility.

The following options can be set using the Transact-SQL SET statement in SQL Anywhere, as well as in Adaptive Server Enterprise:

The SET statement is allowed by SQL Anywhere for the prefetch option, for compatibility, but has no effect.



Side effects


See also
Standards and compatibility