Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
36 views

SQL Server Cheat Sheet: by Via

This document provides a cheat sheet for SQL Server that lists and defines various data types, functions, and other elements in SQL Server including numeric, string, date/time data types as well as aggregation, ranking, mathematical and string functions. It also covers type conversion functions and table functions. The cheat sheet was created by Dave Child and published on cheatography.com in 2011, with the last update being June 2014.

Uploaded by

Tacas Ato
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

SQL Server Cheat Sheet: by Via

This document provides a cheat sheet for SQL Server that lists and defines various data types, functions, and other elements in SQL Server including numeric, string, date/time data types as well as aggregation, ranking, mathematical and string functions. It also covers type conversion functions and table functions. The cheat sheet was created by Dave Child and published on cheatography.com in 2011, with the last update being June 2014.

Uploaded by

Tacas Ato
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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

GROUPING

VARP

hh

Hour

mi, n

Minute

ss, s

Second

ms

Millisecond

float

real

Date and Time


smalldatetime

timestamp

SQL Server Ranking Functions

datetime

RANK

NTILE

Strings

DENSE_RANK

ROW_NUMBER

char

text

SQL Server Mathematical Functions


SQL Server String Functions

ABS

LOG10

ASCII

REPLICATE

ACOS

PI

CHAR

REVERSE

ASIN

POWER

CHARINDEX

RIGHT

ATAN

RADIANS

DIFFERENCE

RTRIM

ATN2

RAND

LEFT

SOUNDEX

CEILING

ROUND

LEN

SPACE

COS

SIGN

LOWER

STR

COT

SIN

LTRIM

STUFF

DEGREES

SQUARE

NCHAR

SUBSTRING

EXP

SQRT

PATINDEX

UNICODE

FLOOR

TAN

SQL Server Type Conversion

REPLACE

UPPER

LOG

CAST (expression AS datatype)

QUOTENAME

varchar
Unicode Strings
nchar

ntext

nvarchar
Binary Strings
binary

image

varbinary
Miscellaneous
cursor
sql_variant

table
xml

CONVERT (datatype, expression)

SQL Server Date Functions

SQL Server Table Functions

DATEADD (datepart, number, date)

ALTER

DROP

DATEDIFF (datepart, start, end)

CREATE

TRUNCATE

DATENAME (datepart, date)


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 1st June, 2014.

Measure your website readability!

www.addedbytes.com

Page 1 of 1.

https://readability-score.com

You might also like