SQL Server - Cheat Sheet

Published on June 2016 | Categories: Documents | Downloads: 94 | Comments: 0 | Views: 543
of 1
Download PDF   Embed   Report

SQL Server - Cheat Sheet

Comments

Content

SQL Server Cheat Sheet
by DaveChild via cheatography.com/1/cs/18/
SQL Server Data Types

SQL Server Grouping (Aggregate) Functions

SQL Server Date Functions

Exact Numerics

AVG

MAX

DATEADD (datepart, number, date)

bit

decimal

BINARY_CHECKSUM

MIN

DATEDIFF (datepart, start, end)

tinyint

money

CHECKSUM

SUM

DATENAME (datepart, date)

smallint

numeric

CHECKSUM_AVG

STDEV

DATEPART (datepart, date)

bigint

COUNT

STDEVP

DAY (date)

Approximate Numerics

COUNT_BIG

VAR

GETDATE()

GROUPING

VARP

GETUTCDATE()

float

real

Date and Time

MONTH (date)

smalldatetime

timestamp

SQL Server Ranking Functions

datetime

RANK

NTILE

Strings

DENSE_RANK

ROW_NUMBER

char

text

varchar

SQL Server String Functions

YEAR (date)
SQL Server Dateparts
yy, yyyy

Year

qq, q

Quarter

ASCII

REPLICATE

mm, m

Month

CHAR

REVERSE

dy, y

Day of Year

CHARINDEX

RIGHT

dd, d

Day

DIFFERENCE

RTRIM

wk, ww

Week

LEFT

SOUNDEX

hh

Hour

LEN

SPACE

mi, n

Minute

LOWER

STR

ss, s

Second

LTRIM

STUFF

ms

Millisecond

NCHAR

SUBSTRING

PATINDEX

UNICODE

SQL Server Mathematical Functions

SQL Server Type Conversion

REPLACE

UPPER

ABS

LOG10

CAST (expression AS datatype)

QUOTENAME

ACOS

PI

ASIN

POWER

ATAN

RADIANS

SQL Server Table Functions

ATN2

RAND

ALTER

DROP

CEILING

ROUND

CREATE

TRUNCATE

COS

SIGN

COT

SIN

DEGREES

SQUARE

EXP

SQRT

FLOOR

TAN

Unicode Strings
nchar

ntext

nvarchar
Binary Strings
binary

image

varbinary
Miscellaneous
cursor

table

sql_variant

xml

CONVERT (datatype, expression)

LOG
Cheatographer

Cheat Sheet

Sponsor

DaveChild

This cheat sheet was published on 19th October,

Envoy, for simple and effective bug management.

cheatography.com/davechild/

2011 and was last updated on 20th October, 2011.

Try it free!

www.addedbytes.com/

http://www.envoyapp.com

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close