T-SQL Reference
SQL Server Transact-SQL language reference covering statements, queries, data types, operators, functions, hints, predicates, transactions, and language elements.
Most code examples in the Transact-SQL reference were tested on servers that are running a
table (trigger scope). For
Returns the name of the SQL Server instance the client is connected to.
Represents the number of 100-nanosecond intervals (ticks) for time-related calculations.
No description available.
char varchar nchar nvarchar varchar(max) nvarchar(max) binary varbinary varbinary(max) varchar(max) nvarchar(max) varchar(max) nvarchar(max)
No description available.
No description available.
No description available.
Input type Return type float real float decimal( p , s ) decimal(38, s ) int smallint tinyint...
No description available.
No description available.
Under certain conditions, spatial indexes support a number of set-oriented geometry methods.
No description available.
2025 (17.x)
The new owner principal must be one of the following:
No description available.
When the database compatibility level is 110 or higher. See
No description available.
' ' ' ' nvarchar(255) ' ' nvarchar(32) Shared Update IntentShared IntentExclusive Exclusive ' ' nvarchar(32) Transaction Session...
) value as the number of minutes (signed). This statement
No description available.
No description available.
If any dependent assemblies referenced by the root assembly aren't already in the database
Returns information about assembly properties.
No description available.
No description available.
2025 (17.x)
Here's the result set.
Milliseconds can be preceded by either a colon (:) or a period (.).
No description available.
You can't change the compression setting of a single partition if the table has nonaligned
No description available.
2022 (16.x)
No description available.
No description available.
No description available.
This example returns the top ten employees ranked by their salary.
No description available.
No description available.
Input type Return type float real float decimal( p , s ) decimal( p , 0) int smallint...
Returns the public portion of a certificate in binary format.
VERIFYSIGNEDBYASYMKEY
value.
or online index rebuild DDL operation currently being run without taking
Specifies the name of the new Windows service account.
T-SQL reference covering character varying.
No description available.
Columns participating in a foreign key relationship must be defined with the same length
No description available.
In the definition of a check constraint.
No description available.
Schema name is omitted.
No description available.
Indicates that the value of an expression is the result of an operation between two strings
Here's the result set.
Returns information about a specified collation.
Returns the start point of a geometry instance (for LineString types).
Returns a geometry instance from a collection of geometry types.
No description available.
No description available.
No description available.
No description available.
ODBC does not fully support
No description available.
In the preceding code example, the final example has a mismatch between format
performance differences of your most important queries between two different compatibility
RESTORE LOG can include a file list to allow for creation of files during rollforward.
No description available.
Gzip varbinary(max) binary( n ) char( n ) nchar( n ) nvarchar(max) nvarchar( n ) varbinary(max) varbinary( n...
columns that exceed the byte limit can be created if the existing
optimizer doesn't need to perform extra validation processing to locate and update
When you design a partitioning scheme, it must be clear what data belongs to each partition.
No description available.
T-SQL reference for Configuration functions syntax and usage.
No description available.
SET TRANSACTION ISOLATION LEVEL
Converts radians to degrees.
No description available.
No description available.
No description available.
No description available.
No description available.
No description available.
You don't need to enclose currency or monetary data in single quotation marks (
When you convert to date and time data types, SQL Server rejects all values it cannot recognize
- 3.40E + 38 to -1.18E - 38, 0 and 1.18E - 38 to 3.40E + 38
When you execute a signed module, the signatures are temporarily added to the SQL token,
Creates a server-level credential for authentication to external resources.
2016 (13.x) and later versions
No description available.
T-SQL reference for CREATE USER syntax and usage.
T-SQL reference covering sp_describe_cursor.
No description available.
No description available.
No description available.
No description available.
Returns the ID for a schema-scoped object.
command isn't supported for the statistics object on a
No description available.