SESSIONPROPERTY() Function in SQL Server Last Updated : 19 Jan, 2021 Comments Improve Suggest changes Like Article Like Report SESSIONPROPERTY() function : This function in SQL Server is used to return the settings of the session that is specified in the argument section. Features : This function is used to find the settings of the session state.This function comes under Advanced Functions.This function accepts only one parameter namely option. Syntax : SESSIONPROPERTY(option) Parameter : This method accepts only one parameter is given below as follows. option -Specified option which is used for retrieving the session settings. It can be any one of the following values given below as follows. ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, NUMERIC_ROUNDABOUT, and QUOTED_IDENTIFIER. Returns : It returns the settings of the session that is specified in the argument section. Example-1 : Using SESSIONPROPERTY() function and getting the output. SELECT SESSIONPROPERTY('ANSI_PADDING'); Output : 1 Here, 1 means that this session property is on. Example-2 : Using SESSIONPROPERTY() function and getting the output. SET ANSI_WARNINGS OFF; SELECT SESSIONPROPERTY('ANSI_WARNINGS'); Output : 0 Here, 0 is returned as we have turned off the session property. Example-3 : Using SESSIONPROPERTY() function and getting the output using a variable. DECLARE @sp VARCHAR(20); SET @sp = 'CONCAT_NULL_YIELDS_NULL'; SELECT SESSIONPROPERTY(@sp); Output : NULL Here, NULL is returned as concatenated outputs are considered as NULL. Example-4 : Using SESSIONPROPERTY() function and 'ARITHABORT' as argument to get the output. SELECT SESSIONPROPERTY('ARITHABORT'); Output : 0 Here, 0 is returned as this property is turned off. Application : This function is used to find the settings of the session that is specified in the argument section. Comment More infoAdvertise with us Next Article SESSIONPROPERTY() Function in SQL Server nidhi1352singh Follow Improve Article Tags : SQL DBMS-SQL SQL-Server Similar Reads SESSION_USER() Function in SQL Server SESSION_USER() : This function in SQL Server is used to return the current user's name in the database of SQL Server that is in use. Features : This function is used to find the current user's name.This function comes under Advanced Functions.This function doesn't accept any parameter. Syntax : SESS 2 min read SIGN() Function in SQL Server In SQL Server, the SIGN() function is a mathematical function used to determine the sign of a given numeric expression. This function is particularly useful when we want to evaluate whether a number is positive, negative or zero. In this article, We will learn about SIGN() Function in SQL Server in 3 min read SQL Server SPACE() function The SQL Server SPACE() function is a handy tool for generating a string of space characters. It is particularly useful for formatting and padding data within SQL queries. By specifying the number of spaces, users can ensure consistent spacing in output results, which can be critical for aligning tex 3 min read Scalar Function in SQL Server Pre-requisites: Categories of SQL Functions In SQL Server, a scalar function is a type of user-defined function that returns a single scalar value based on the input parameters passed to it. The scalar function is used to perform some calculations or operations on the input parameters and return a s 2 min read SQRT() Function in SQL Server SQRT() function : This function in SQL Server is used to return the square root of a specified positive number. For example, if the specified number is 81, this function will return 9. Features : This function is used to find the square root of a given number. This function accepts only positive num 2 min read RANK() Function in SQL Server The RANK() function is a powerful window function in SQL Server used to assign a rank to each row within a result set. It is particularly useful when we need to assign a rank to a group of rows based on some sorting criteria and want to differentiate between rows that have the same values. Unlike ot 5 min read ISNUMERIC() Function in SQL Server The ISNUMERIC() function in SQL Server is a critical tool for determining whether a given expression or value can be interpreted as a numeric type. This function is valuable for data validation and ensuring that values conform to numeric formats before performing calculations or other operations tha 3 min read SUM() Function in SQL Server The SUM() function in SQL Server is an essential aggregate function used to calculate the total sum of values in a numeric column. It aggregates data by summing up all values in the specified column for the rows that match the criteria of the query.In this article, We will learn about SUM() Function 3 min read LOG() Function in SQL Server The LOG() function returns the logarithm of a specified number or the logarithm of the number to the specified base. Syntax : LOG(number, base) Parameter : LOG() function accepts two-parameters as mentioned above and described below. number - This parameter hold a number which is greater than 0. bas 1 min read SYSTEM_USER() Function in SQL Server SYSTEM_USER() function :This function in SQL Server is used to return the current user's login name.Features : This function is used to find the current user's login name.This function comes under Advanced Functions.This function doesn't accept any parameter. Syntax : SYSTEM_USER; Parameter :This me 2 min read Like