SET statement [T-SQL]

Description

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

Syntax

SET option-name option-value

Usage

Table 6-14 lists the available options.

Table 6-14: Transact-SQL SET options

Option name

Option value

ANSINULL

ON | OFF

ANSI_PERMISSIONS

ON | OFF

CLOSE_ON_ENDTRANS

ON | OFF

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, IQ also provides support for the Adaptive Server Enterprise SET statement for a set of options particularly useful for compatibility.

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

In Sybase IQ, if the ROWCOUNT setting 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 re-fetched due to truncation warnings, the count may be inaccurate.

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

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


Side effects

None.

Standards

Permissions

None.

See also

SET OPTION statement