SQL Server Cheat Sheet
by Dave Child (DaveChild) via cheatography.com/1/cs/18/
SQL Server Data Types SQL Server Grouping (Aggregate) Functions SQL Server Dateparts
Exact Numerics AVG MAX yy, yyyy Year
bit decimal BINARY_CHECKSUM MIN qq, q Quarter
tinyint money CHECKSUM SUM mm, m Month
smallint numeric CHECKSUM_AVG STDEV dy, y Day of Year
bigint COUNT STDEVP dd, d Day
Approximate Numerics COUNT_BIG VAR wk, ww Week
float real GROUPING VARP hh Hour
Date and Time mi, n Minute
SQL Server Ranking Functions
smalldatetime timestamp ss, s Second
RANK NTILE ms Millisecond
datetime
DENSE_RANK ROW_NUMBER
Strings
SQL Server Mathematical Functions
char text SQL Server String Functions
ABS LOG10
varchar
ASCII REPLICATE ACOS PI
Unicode Strings
CHAR REVERSE ASIN POWER
nchar ntext
CHARINDEX RIGHT ATAN RADIANS
nvarchar
DIFFERENCE RTRIM ATN2 RAND
Binary Strings
LEFT SOUNDEX CEILING ROUND
binary image
LEN SPACE COS SIGN
varbinary
LOWER STR COT SIN
Miscellaneous
LTRIM STUFF DEGREES SQUARE
cursor table
NCHAR SUBSTRING EXP SQRT
sql_variant xml
PATINDEX UNICODE FLOOR TAN
REPLACE UPPER LOG
SQL Server Type Conversion
QUOTENAME
CAST (expression AS datatype)
CONVERT (datatype, expression) SQL Server Date Functions
DATEADD (datepart, number, date)
SQL Server Table Functions
DATEDIFF (datepart, start, end)
ALTER DROP
DATENAME (datepart, date)
CREATE TRUNCATE
DATEPART (datepart, date)
DAY (date)
GETDATE()
GETUTCDATE()
MONTH (date)
YEAR (date)
By Dave Child (DaveChild) Published 19th October, 2011. Sponsored by Readability-Score.com
cheatography.com/davechild/ Last updated 13th May, 2016. Measure your website readability!
www.getpostcookie.com Page 1 of 1. https://readability-score.com