SQL Server SESSIONPROPERTY() Function

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

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.