SET options
41 reference entries
- SET
none (documentation, rules or examples)
- SET ANSI_DEFAULTS
turns on a group of ISO settings at once (ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ANSI_NULL_DFLT_ON, CURSOR_CLOSE_ON_COMMIT, IMPLICIT_TRANSACTIONS, QUOTED_IDENTIFIER)
- SET ANSI_NULL_DFLT_OFF
default nullability of new columns is NOT NULL when not stated
- SET ANSI_NULL_DFLT_ON
default nullability of new columns is NULL when not stated
- SET ANSI_NULLS
= NULL / <> NULL comparisons yield UNKNOWN when ON; changes which rows pass filters and joins
- SET ANSI_PADDING
trailing blanks/zeros storage for new char/binary columns
- SET ANSI_WARNINGS
errors or warnings for NULL in aggregates, divide by zero, truncation
- SET ARITHABORT
ends a query on overflow or divide-by-zero
- SET ARITHIGNORE
whether overflow/divide-by-zero messages are returned
- SET CONCAT_NULL_YIELDS_NULL
'a' + NULL yields NULL when ON; changes string concatenation results
- SET CONTEXT_INFO
writes up to 128 bytes of session context (read by CONTEXT_INFO())
- SET CURSOR_CLOSE_ON_COMMIT
closes open cursors at commit
- SET DATEFIRST
first day of week; changes DATEPART(weekday) and @@DATEFIRST
- SET DATEFORMAT
order of date parts when parsing strings; changes conversions
- SET DEADLOCK_PRIORITY
deadlock victim preference
- SET FIPS_FLAGGER
flags non-FIPS 127-2 syntax (parse time)
- SET FMTONLY
returns only metadata, no rows (deprecated)
- SET FORCEPLAN
join order follows FROM order
- SET IDENTITY_INSERT
allows explicit values in the identity column of one table; changes INSERT lineage
- SET IMPLICIT_TRANSACTIONS
statements open a transaction automatically; requires COMMIT
- SET LANGUAGE
language for date names and messages; implicitly sets DATEFORMAT and DATEFIRST
- SET LOCK_TIMEOUT
milliseconds to wait for locks
- SET NOCOUNT
suppresses 'rows affected' messages; @@ROWCOUNT still updated
- SET NOEXEC
compiles but does not run following statements
- SET NUMERIC_ROUNDABORT
error on loss of precision in expressions
- SET OFFSETS
returns token offsets (parse time, DB-Library)
- SET PARSEONLY
parses only, no compile or run (parse time)
- SET QUERY_GOVERNOR_COST_LIMIT
rejects queries above an estimated cost
- SET QUOTED_IDENTIFIER
double quotes delimit identifiers instead of strings (parse time)
- SET REMOTE_PROC_TRANSACTIONS
promotes remote procedure calls to distributed transactions (deprecated)
- SET ROWCOUNT
stops processing after N rows for following statements; acts like an implicit TOP
- SET SHOWPLAN_ALL
returns estimated plan rows instead of running statements
- SET SHOWPLAN_TEXT
returns estimated plan text instead of running statements
- SET SHOWPLAN_XML
returns estimated XML plan instead of running statements
- SET STATISTICS IO
adds I/O counters per table to messages
- SET STATISTICS PROFILE
adds an actual plan profile result set
- SET STATISTICS TIME
adds parse/compile/execute times to messages
- SET STATISTICS XML
adds an actual XML plan result set
- SET TEXTSIZE
caps returned size of large varchar(max)/nvarchar(max)/varbinary(max)/text/ntext/image values
- SET TRANSACTION ISOLATION LEVEL
read consistency for following reads (READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SNAPSHOT, SERIALIZABLE)
- SET XACT_ABORT
a run-time error rolls back the whole transaction