Home > SQL Server > Get the session property – SESSIONPROPERTY() – SQL SERVER

Get the session property – SESSIONPROPERTY() – SQL SERVER


SessionProperty(”): This function returns the SET option settings of the current session. This function returns sql_variant type value. The return value could be 1 or 0 if the function argument is valid or Null if the option is invalid.

Set options that can be used in this function are

pic1Implementation

select Sessionproperty(‘ANSI_NULLS’)
select Sessionproperty(‘ANSI_PADDING’)
select Sessionproperty(‘QUOTED_IDENTIFIER’)

We can also use @@Options function in place of the above function.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: