Skip Navigation

Find cheat sheets for every topic, or make your own to share with your friends.

All Added Bytes cheat sheets are available free at Cheatography!

Visit Cheatography »

SQL Server Cheat Sheet

This A4 reference lists the various functions available in Microsoft SQL Server, and demonstrates the creation of stored procedures, triggers and functions.

The SQL Server cheat sheet is a one-page A4 printable document, designed to provide a quick reference for SQL Server. A description of what is on the cheat sheet follows, or if you are impatient, you can go straight to the full size SQL Server cheat sheet.

It's been a while since my last cheat sheet release. But what could be better than to get the ball rolling again with the most requested cheat sheet not yet created (until now) - SQL Server. Microsoft's database engine is the source of many arguments between developers, but whether or not you believe another database to be superior, SQL Server is undoubtably powerful and includes some great management tools (Enterprise Manager, Query Analyser and the more recent SQL Server Management Studio) missing from comparable technologies.

Data Types and Conversion

Thumbnail highlighting Data Types and Conversion section. SQL Server supports a large variety of data types and good database design relies in part on using the right data type for the right column. This section lists the data types available in groups. I've also included the syntax for the CAST and CONVERT functions here for convenience.

Functions

Thumbnail highlighting Functions sections. SQL Server has a large array of built in functions of varying use. This section includes string, date, mathematical, grouping, ranking and table functions. Alongside the date functions block there is also a run down of the different "dateparts" - the characters used in date functions to denote different periods (day, week, month etc).

Creation

Thumbnail highlighting Creation section. Finally (short description for this cheat sheet!), the third part of the cheat sheet contains sample code for the creation of stored procedures, views, triggers, indexes and functions (the last of which I don't make nearly enough use of).

Download

The cheat sheet is available in two formats, PNG and PDF:

And finally, if you like the cheat sheets, and want to say thanks, please consider buying me something from my Amazon Wishlist. Thankyou very much to those who have already hunted it down and sent me something nice - I'm very grateful!

Related Cheat Sheets

ASP / VBScript

ASP / VBScript Cheat Sheet

A quick reference guide for ASP / VBScript, containing functions, collections, regular expression syntax and other useful bits of information.

MySQL

MySQL Cheat Sheet

A quick reference guide for MySQL, including functions (both in MySQL and PHP), data types, and sample queries. Available in PDF and PNG formats.


comments powered by Disqus