--- title: "SESSIONPROPERTY (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "03/06/2017" ms.prod: "sql-non-specified" ms.reviewer: "" ms.suite: "" ms.technology: - "database-engine" ms.tgt_pltfrm: "" ms.topic: "language-reference" f1_keywords: - "SESSIONPROPERTY" - "SESSIONPROPERTY_TSQL" dev_langs: - "TSQL" helpviewer_keywords: - "SET statement, SESSIONPROPERTY function" - "SESSIONPROPERTY function" - "sessions [SQL Server], SET options settings" ms.assetid: 1f3730b4-1495-4d3a-af43-e57952812df9 caps.latest.revision: 22 author: "BYHAM" ms.author: "rickbyh" manager: "jhubbard" --- # SESSIONPROPERTY (Transact-SQL) [!INCLUDE[tsql-appliesto-ss2008-asdb-xxxx-xxx_md](../../includes/tsql-appliesto-ss2008-asdb-xxxx-xxx-md.md)] Returns the SET options settings of a session. ![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md) ## 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

0 = OFF| |ANSI_PADDING|Controls the way the column stores values shorter than the defined size of the column, and the way the column stores values that have trailing blanks in character and binary data.

1 = ON

0 = OFF| |ANSI_WARNINGS|Specifies whether the ISO standard behavior of raising error messages or warnings for certain conditions, including divide-by-zero and arithmetic overflow, is applied.

1 = ON

0 = OFF| |ARITHABORT|Determines whether a query is ended when an overflow or a divide-by-zero error occurs during query execution.

1 = ON

0 = OFF| |CONCAT_NULL_YIELDS_ NULL|Controls whether concatenation results are treated as null or empty string values.

1 = ON

0 = OFF| |NUMERIC_ROUNDABORT|Specifies whether error messages and warnings are generated when rounding in an expression causes a loss of precision.

1 = ON

0 = OFF| |QUOTED_IDENTIFIER|Specifies whether ISO rules about how to use quotation marks to delimit identifiers and literal strings are to be followed.

1 = ON

0 = OFF| |\|NULL = Input is not valid.| ## Return Types **sql_variant** ## Remarks SET options are figured by combining server-level, database-level, and user-specified options. ## Examples The following example returns the setting for the `CONCAT_NULL_YIELDS_NULL` option. ``` SELECT SESSIONPROPERTY ('CONCAT_NULL_YIELDS_NULL') ``` ## See Also [sql_variant (Transact-SQL)](../../t-sql/data-types/sql-variant-transact-sql.md) [SET ANSI_NULLS (Transact-SQL)](../../t-sql/statements/set-ansi-nulls-transact-sql.md) [SET ANSI_PADDING (Transact-SQL)](../../t-sql/statements/set-ansi-padding-transact-sql.md) [SET ANSI_WARNINGS (Transact-SQL)](../../t-sql/statements/set-ansi-warnings-transact-sql.md) [SET ARITHABORT (Transact-SQL)](../../t-sql/statements/set-arithabort-transact-sql.md) [SET CONCAT_NULL_YIELDS_NULL (Transact-SQL)](../../t-sql/statements/set-concat-null-yields-null-transact-sql.md) [SET NUMERIC_ROUNDABORT (Transact-SQL)](../../t-sql/statements/set-numeric-roundabort-transact-sql.md) [SET QUOTED_IDENTIFIER (Transact-SQL)](../../t-sql/statements/set-quoted-identifier-transact-sql.md)