Reputation: 2508
I need to know a value of options ANSI_NULLS and QUOTENT_IDENTIFIER on database level.
Which SQL statement may I use in order to see whether they are ON or OFF?
Upvotes: 2
Views: 67
Reputation: 41827
sp_dboption will retrieve the data you want, but it's deprecated and no longer available in SQL 2012. Instead you should use sys.databases
view, e.g.
select is_ansi_null_default_on
, is_ansi_nulls_on
, is_quoted_identifier_on
from sys.databases where name = db_name()
Upvotes: 0
Reputation: 27214
Care of here you can use the following to retrieve options are that on.
EXEC sp_dboption TestDB
Upvotes: 1