THE WORLD'S LARGEST WEB DEVELOPER SITE

SQL Server SESSIONPROPERTY() Function

❮ SQL Server Functions

Example

Return the session settings for a specified option:

SELECT SESSIONPROPERTY('ANSI_NULLS');

Definition and Usage

The SESSIONPROPERTY() function returns the session settings for a specified option.

Syntax

SESSIONPROPERTY(option)

Parameter Values

Parameter Description
option Required. The option to retrieve the session settings for. Can be one of the following values:
  • ANSI_NULLS
  • ANSI_PADDING
  • ANSI_WARNINGS
  • ARITHABORT
  • CONCAT_NULL_YIELDS_NULL
  • NUMERIC_ROUNDABOUT
  • QUOTED_IDENTIFIER

Technical Details

Works in: SQL Server (starting with 2008), Azure SQL Database

❮ SQL Server Functions