Microsoft SQL Server Reference

Technical information on Microsoft SQL Server:

SQL Language Elements

Data Types

Datetime data types:

1 DATE Date (year, month and day) Since SQL Server 2008

Other data types:

1 BIGINT 64-bit integer
2 NCHAR(n) 1 ⇐ n ⇐ 4000 Fixed-length string in Unicode UCS-2
3 NVARCHAR(n) 1 ⇐ n ⇐ 4000 Variable-length string in Unicode UCS-2
4 NVARCHAR(max) 2 GB
5 TIMESTAMP and ROWVERSION Auto-updated binary
6 TINYINT 0 to 255 8-bit unsigned integer

Built-in SQL Functions

Built-in functions in SQL Server:

1 DATEDIFF(units, start, end) Get datetime difference in the specified units
2 @@ERROR Get last error code
3 LEFT(string, n) Return n leftmost characters from string
4 RIGHT(string, n) Return n rightmost characters from string
6 STR(float, len, decimal) Convert float to string
7 YEAR(datetime) Extract year from datetime


SQL and Transact-SQL statements:

Database Settings

How To - Transact SQL

SQL and Transact SQL

SQL Server Metadata

Database Administration (DBA) - Instances and Connections

SQL Server Performance