Set a value in a Transact-SQL variable
T-SQL Reference

Variables have local scope and are only visible within the batch or procedure where you define

#tsql#statements
SET DATEFORMAT
T-SQL Reference

date smalldatetime datetime datetime2 datetimeoffset @ mdy dmy ymd ydm myd dym mdy ydm date datetime2 datetimeoffset datetime...

#tsql#statements
SET DATEFORMAT example
T-SQL Reference

No description available.

#tsql#statements
SET FMTONLY
T-SQL Reference

Controls whether metadata-only mode is active for query results.

#tsql#statements
SET LANGUAGE example: Month name in Polish
T-SQL Reference

No description available.

#tsql#statements
Set options
T-SQL Reference

No description available.

#tsql#statements
SET Statements
T-SQL Reference

No description available.

#tsql#statements
SET STATISTICS TIME
T-SQL Reference

No description available.

#tsql#statements
SET TEXTSIZE
T-SQL Reference

varchar(max) nvarchar(max) varbinary(max) text ntext image varchar(max) nvarchar(max) varbinary(max) text ntext image ntext text image nvarchar(max) varchar(max) varbinary(max)

#tsql#statements
Shape properties
T-SQL Reference

Describes the shape properties available for spatial data types in T-SQL, including geometry and geography methods.

#tsql#statements
ShortestLineTo (geography Data Type)
T-SQL Reference

LineString geography LineString geography geography geography geography LineString geography LineString geography LineString geography

#tsql#data-types
ShortestLineTo (geometry Data Type)
T-SQL Reference

LineString geometry LineString geometry geometry geometry geometry LineString geometry LineString geometry LineString geometry

#tsql#data-types
Shrink a log file
T-SQL Reference

Currently, LOB column types (

#tsql#statements
SIGN
T-SQL Reference

No description available.

#tsql#statements
Singleton checks
T-SQL Reference

When reporting errors,

#tsql#statements
smalldatetime
T-SQL Reference

Property Value smalldatetime Usage Default string literal formats Date range Time range Element ranges time date datetime2 datetimeoffset...

#tsql#data-types
smalldatetime description
T-SQL Reference

No description available.

#tsql#data-types
Spatial operations
T-SQL Reference

Reduce (geometry Data Type)

#tsql#data-types
Spatial Types - geometry
T-SQL Reference

The geometry spatial data type represents data in a Euclidean (flat) coordinate system.

#tsql#data-types
Special Cases and Conditions
T-SQL Reference

No description available.

#tsql#operators
Specify a user or login name
T-SQL Reference

Doesn't apply to dynamic queries inside the module.

#tsql#operators
Specify negative and positive numbers
T-SQL Reference

doesn't enforce any kind of grouping rules such as inserting a comma (

#tsql#operators
Specify table hints as query hints
T-SQL Reference

No description available.

#tsql#data-types
Specifying a User or Login Name
T-SQL Reference

No description available.

#tsql#operators
STCurveN (geography Data Type)
T-SQL Reference

T-SQL reference covering ArgumentOutOfRangeException.

#tsql#data-types
STCurveN (geometry Data Type)
T-SQL Reference

geometry LineString CircularString CompoundCurve MultiLineString int geometry geometry NULL geometry geometry geometry geometry Point MultiPoint Polygon CurvePolygon MultiPolygon

#tsql#data-types
STCurveToLine (geography Data Type)
T-SQL Reference

geography geography LineString CircularString CompoundCurve Polygon CurvePolygon geography CircularString CompoundCurve CurvePolygon geography

#tsql#data-types
STCurveToLine (geometry Data Type)
T-SQL Reference

T-SQL reference covering GeometryCollection.

#tsql#data-types
STGeometryN (geography Data Type)
T-SQL Reference

T-SQL reference covering GeometryCollection.

#tsql#data-types
STGeometryN (geometry Data Type)
T-SQL Reference

Returns the specified geometry from a geometry collection.

#tsql#data-types
STGeometryType (geography Data Type)
T-SQL Reference

T-SQL reference covering GeometryCollection.

#tsql#data-types
STGeometryType (geometry Data Type)
T-SQL Reference

T-SQL reference covering Polygon, CurvePolygon.

#tsql#data-types
STInteriorRingN (geometry Data Type)
T-SQL Reference

Returns the specified interior ring of a polygon geometry instance.

#tsql#data-types
STLineFromText (geography Data Type)
T-SQL Reference

Constructs a linestring geography instance from a Well-Known Text (WKT) representation.

#tsql#data-types
STLineFromText (geometry Data Type)
T-SQL Reference

Constructs a linestring geometry instance from a Well-Known Text (WKT) representation.

#tsql#data-types
STLineFromWKB (geography Data Type)
T-SQL Reference

Constructs a linestring geography instance from a Well-Known Binary (WKB) representation.

#tsql#data-types
STLineFromWKB (geometry Data Type)
T-SQL Reference

Constructs a linestring geometry instance from a Well-Known Binary (WKB) representation.

#tsql#data-types
STMLineFromText (geography Data Type)
T-SQL Reference

Constructs a linestring geography instance from a Well-Known Text (WKT) representation.

#tsql#data-types
STMLineFromText (geometry Data Type)
T-SQL Reference

Constructs a linestring geometry instance from a Well-Known Text (WKT) representation.

#tsql#data-types
STMLineFromWKB (geography Data Type)
T-SQL Reference

Constructs a linestring geography instance from a Well-Known Binary (WKB) representation.

#tsql#data-types
STMLineFromWKB (geometry Data Type)
T-SQL Reference

Constructs a linestring geometry instance from a Well-Known Binary (WKB) representation.

#tsql#data-types
STMPointFromText (geography Data Type)
T-SQL Reference

Constructs a point geography instance from a Well-Known Text (WKT) representation.

#tsql#data-types
STMPointFromText (geometry Data Type)
T-SQL Reference

Constructs a point geometry instance from a Well-Known Text (WKT) representation.

#tsql#data-types
STMPointFromWKB (geography Data Type)
T-SQL Reference

Constructs a point geography instance from a Well-Known Binary (WKB) representation.

#tsql#data-types
STMPointFromWKB (geometry Data Type)
T-SQL Reference

Constructs a point geometry instance from a Well-Known Binary (WKB) representation.

#tsql#data-types
STMPolyFromText (geography Data Type)
T-SQL Reference

Constructs a polygon geography instance from a Well-Known Text (WKT) representation.

#tsql#data-types
STMPolyFromText (geometry Data Type)
T-SQL Reference

Constructs a polygon geometry instance from a Well-Known Text (WKT) representation.

#tsql#data-types
STMPolyFromWKB (geography Data Type)
T-SQL Reference

Constructs a polygon geography instance from a Well-Known Binary (WKB) representation.

#tsql#data-types
STMPolyFromWKB (geometry Data Type)
T-SQL Reference

Constructs a polygon geometry instance from a Well-Known Binary (WKB) representation.

#tsql#data-types
STNumCurves (geography Data Type)
T-SQL Reference

geography geography LineString CircularString CompoundCurve geography geography MultiLineString NULL geography Null geography

#tsql#data-types
STNumGeometries (geography Data Type)
T-SQL Reference

T-SQL reference covering GeometryCollection.

#tsql#data-types
STNumGeometries (geometry Data Type)
T-SQL Reference

Returns the number of geometries in a geometry collection.

#tsql#data-types
STPointFromText (geography Data Type)
T-SQL Reference

Constructs a point geography instance from a Well-Known Text (WKT) representation.

#tsql#data-types
STPointFromText (geometry Data Type)
T-SQL Reference

Constructs a point geometry instance from a Well-Known Text (WKT) representation.

#tsql#data-types
STPointFromWKB (geography Data Type)
T-SQL Reference

Constructs a point geography instance from a Well-Known Binary (WKB) representation.

#tsql#data-types
STPointFromWKB (geometry Data Type)
T-SQL Reference

Constructs a point geometry instance from a Well-Known Binary (WKB) representation.

#tsql#data-types
STPointN (geography Data Type)
T-SQL Reference

Returns the specified point from a geography instance.

#tsql#data-types
STPolyFromText (geography Data Type)
T-SQL Reference

Constructs a polygon geography instance from a Well-Known Text (WKT) representation.

#tsql#data-types
STPolyFromText (geometry Data Type)
T-SQL Reference

Constructs a polygon geometry instance from a Well-Known Text (WKT) representation.

#tsql#data-types
STPolyFromWKB (geography Data Type)
T-SQL Reference

Constructs a polygon geography instance from a Well-Known Binary (WKB) representation.

#tsql#data-types
STPolyFromWKB (geometry Data Type)
T-SQL Reference

Constructs a polygon geometry instance from a Well-Known Binary (WKB) representation.

#tsql#data-types
STRelate (geometry Data Type)
T-SQL Reference

Returns true if the geometry instance is spatially related to another geometry according to the specified DE-9IM intersection pattern.

#tsql#data-types
String and binary types
T-SQL Reference

No description available.

#tsql#data-types
Structure of a recursive CTE
T-SQL Reference

No description available.

#tsql#statements
Summary of support for WITH options
T-SQL Reference

contains the backup from a single, successful backup operation. RESTORE, RESTORE

#tsql#queries
Supplementary characters (surrogate pairs)
T-SQL Reference

No description available.

#tsql#statements
Supported data types
T-SQL Reference

When working with parquet files,

#tsql#data-types
Supported objects
T-SQL Reference

Starting with SQL Server 2019 (15.x),

#tsql#statements
Supported string literal formats for date
T-SQL Reference

No description available.

#tsql#data-types
Supported string literal formats for datetime
T-SQL Reference

No description available.

#tsql#data-types
Supported string literal formats for datetimeoffset
T-SQL Reference

26 positions minimum (yyyy-MM-dd HH:mm:ss {+|-}hh:mm) to 34

#tsql#data-types
Supported String Literal Formats for time
T-SQL Reference

* Not supported in Informatica.

#tsql#data-types
Syntax for disk-based tables
T-SQL Reference

No description available.

#tsql#statements
Syntax for memory-optimized tables
T-SQL Reference

For more information, see:

#tsql#statements
Syntax for SQL Server 2019
T-SQL Reference

2017 (14.x) and later versions

#tsql#statements
Syntax options
T-SQL Reference

No description available.

#tsql#statements
Syntax Summary
T-SQL Reference

CREATE USER can't be used to create a guest user because the guest user already exists inside

#tsql#statements
System Functions
T-SQL Reference

No description available.

#tsql#statements
System Statistical Functions
T-SQL Reference

No description available.

#tsql#statements
table
T-SQL Reference

No description available.

#tsql#data-types
Table fragmentation
T-SQL Reference

performance. A fast scan doesn't read the leaf or data level pages of the index. The

#tsql#data-types
Table variables and row estimates
T-SQL Reference

A constraint that enforces entity integrity for a given column or columns through a unique

#tsql#data-types
Table variables vs temporary tables
T-SQL Reference

No description available.

#tsql#data-types
Temporary tables
T-SQL Reference

No description available.

#tsql#statements
the effects of ALL and parentheses
T-SQL Reference

No description available.

#tsql#operators
the index
T-SQL Reference

fragments containing multiple languages are supported.

#tsql#hints
The model database and creating new databases
T-SQL Reference

Every database has at least two files, a

#tsql#operators
The modify method
T-SQL Reference

JSON function support was first introduced in SQL Server 2016 (13.x). The native

#tsql#statements
time Description
T-SQL Reference

No description available.

#tsql#data-types
Time zone offset
T-SQL Reference

doesn't allow addition for a

#tsql#data-types
Trace flags
T-SQL Reference

The following table lists and describes the trace flags that are available in SQL Server.

#tsql#statements
Transact-SQL reference
T-SQL Reference

CREATE SERVER AUDIT (Transact-SQL)

#tsql#statements
Transaction control syntax
T-SQL Reference

No description available.

#tsql#transactions
Transaction isolation levels
T-SQL Reference

No description available.

#tsql#transactions
Transactions
T-SQL Reference

Transaction mode Autocommit transactions Explicit transactions Implicit transactions Batch-scoped transactions

#tsql#transactions
Trigger implementation
T-SQL Reference

No description available.

#tsql#statements
Trigonometric functions
T-SQL Reference

No description available.

#tsql#statements
Troubleshoot
T-SQL Reference

Consider the following information when you plan to shrink a file:

#tsql#statements
Truncating and rounding results
T-SQL Reference

No description available.

#tsql#operators
Understand DBCC error messages
T-SQL Reference

command finishes, a message is written to the SQL Server error log.

#tsql#statements