SET statement [T-SQL]

Description

Sets database options in an Adaptive Server Enterprise-compatible manner.

Syntax

SET option-name option-value

Usage

Table 1-13 lists available options.

Table 1-13: Transact-SQL SET options

Option name

Option value

ANSINULL

ON | OFF

ANSI_PERMISSIONS

ON | OFF

CLOSE_ON_ENDTRANS

ON

QUOTED_IDENTIFIER

ON | OFF

ROWCOUNT

integer

STRING_RTRUNCATION

ON | OFF

TRANSACTION ISOLATION LEVEL

0 | 1 | 2 | 3

Database options in Sybase IQ are set using the SET OPTION statement. However, Sybase IQ also provides support for the Adaptive Server Enterprise SET statement for a set of options particularly useful for compatibility.

You can set these options using the Transact-SQL SET statement in Sybase IQ, as well as in Adaptive Server Enterprise:

In Sybase IQ, if ROWCOUNT is greater than the number of rows that dbisql can display, dbisql may do some extra fetches to reposition the cursor. Thus, the number of rows actually displayed may be less than the number requested. Also, if any rows are refetched due to truncation warnings, the count might be inaccurate.

A value of zero resets the option to get all rows.

In addition, this SET statement is allowed by Sybase IQ for compatibility, but has no effect:


Side effects

None

Standards

Permissions

None

See also

SET OPTION statement