SESSIONPROPERTY

Returns the SET options settings of a session.

Syntax

SESSIONPROPERTY ( 'option' )

Arguments

option

Is the current option setting for this session. option can be any of the following values:

Option Description
ANSI_NULLS Specifies whether the ISO behavior of equals (=) and not equal to (<>) against null values is applied. 1 = ON
QUOTED_IDENTIFIER Specifies whether ISO rules about how to use quotation marks to delimit identifiers and literal strings are to be followed. 1 = ON
MAXDOP Specifies what is the maximum degree of parallelism configured for a session.
<Any other string> NULL = Input is not valid.

Return types

sql_variant

Example

SELECT SESSIONPROPERTY ('MAXDOP');

See Also