Microsoft Sql Cheat Sheet

Posted : admin On 1/3/2022

The SQL Cheat Sheet injection is another popular technique where user-submitted data is validated before to process or run a query to avoid data breaches and ensure safe data operations without any data loss. SQL is the most common database language used everywhere. Azure DocumentDB lets you query JSON documents using familiar and friendly SQL syntax. If you know SQL, you can get up and running quickly with Azure DocumentDB - and we have an easy to print reference sheet to help you get started. Download the SQL reference sheet. The Azure Cosmos DB query cheat sheets help you quickly write queries for your data by displaying common database queries, operations, functions, and operators in easy-to-print PDF reference sheets. The cheat sheets include reference information for the SQL, MongoDB, Table, and Gremlin APIs. Choose from a letter-sized or A3-sized download. Letter-sized cheat sheets. Download the Azure Cosmos DB letter-sized query cheat sheets.

The SQL cheat sheet is designed to provide a quick reference for the most common SQL statements you use. It is one-page A4 printable document in both PDF and JPEG format. You can print it out and stick it to your desk.

SQL Statements Cheat Sheet

SQL statements cheat sheet gives you the most common SQL queries to help you get familiar with SQL quickly. You can find the most basic SQL statements in the cheat sheet. In addition, you can find the SQL statements for creating database objects such as tables, views and indexes.



We offer the SQL Cheat Sheets in PDF, JPEG and ZIP format:

Link to SQL Cheat Sheet

If you want to link to these SQL Cheat Sheets, please copy the link below and paste it to your web page instead of linking directly to the files. Thanks!

  • Was this tutorial helpful ?

The SQL cheat sheet provides you with the most commonly used SQL statements for your reference. You can download the SQL cheat sheet as follows:

Querying data from a table

Query data in columns c1, c2 from a table

Query all rows and columns from a table

Query data and filter rows with a condition

Query distinct rows from a table

Sort the result set in ascending or descending order

Skip offset of rows and return the next n rows

Group rows using an aggregate function

Filter groups using HAVING clause

Querying from multiple tables

Inner join t1 and t2

Left join t1 and t1

Right join t1 and t2

Perform full outer join

Produce a Cartesian product of rows in tables

Another way to perform cross join


Join t1 to itself using INNER JOIN clause

Using SQL Operators

Combine rows from two queries

Return the intersection of two queries

Subtract a result set from another result set

Query rows using pattern matching %, _

Query rows in a list

Query rows between two values

Check if values in a table is NULL or not

Managing tables

Create a new table with three columns

Delete the table from the database

Sql Server Commands Cheat Sheet

Add a new column to the table

Drop column c from the table

Add a constraint

Drop a constraint

Rename a table from t1 to t2

Rename column c1 to c2

Remove all data in a table

Using SQL constraints

Set c1 and c2 as a primary key

Set c2 column as a foreign key

Make the values in c1 and c2 unique

Ensure c1 > 0 and values in c1 >= c2

Set values in c2 column not NULL

Modifying Data

Insert one row into a table

Microsoft Sql Cheat Sheet

Insert multiple rows into a table

Insert rows from t2 into t1

Update new value in the column c1 for all rows

Update values in the column c1, c2 that match the condition

Delete all data in a table

Delete subset of rows in a table

Managing Views

Create a new view that consists of c1 and c2

Create a new view with check option

Create a recursive view

Create a temporary view

Delete a view

Managing indexes

Create an index on c1 and c2 of the t table

Create a unique index on c3, c4 of the t table

Drop an index

Managing triggers

Create or modify a trigger


Microsoft Sql Commands Cheat Sheet

  • BEFORE – invoke before the event occurs
  • AFTER – invoke after the event occurs


  • INSERT – invoke for INSERT
  • UPDATE – invoke for UPDATE
  • DELETE – invoke for DELETE


Microsoft Sql Cheat Sheet Pdf


Microsoft Sql Syntax Cheat Sheet

Delete a specific trigger