Cheatsheet
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

View only
 
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
2
KeywordDescription
3
ADD
Adds a column in an existing table
4
ADD CONSTRAINT
Adds a constraint after a table is already created
5
ALTER
Adds, deletes, or modifies columns in a table, or changes the data type of a column in a table
6
ALTER COLUMN
Changes the data type of a column in a table
7
ALTER TABLE
Adds, deletes, or modifies columns in a table
8
ALL
Returns true if all of the subquery values meet the condition
9
AND
Only includes rows where both conditions is true
10
ANY
Returns true if any of the subquery values meet the condition
11
AS
Renames a column or table with an alias
12
ASC
Sorts the result set in ascending order
13
BACKUP DATABASE
Creates a back up of an existing database
14
BETWEEN
Selects values within a given range
15
CASE
Creates different outputs based on conditions
16
CHECK
A constraint that limits the value that can be placed in a column
17
COLUMN
Changes the data type of a column or deletes a column in a table
18
CONSTRAINT
Adds or deletes a constraint
19
CREATE
Creates a database, index, view, table, or procedure
20
CREATE DATABASE
Creates a new SQL database
21
CREATE INDEX
Creates an index on a table (allows duplicate values)
22
CREATE OR REPLACE VIEW
Updates a view
23
CREATE TABLE
Creates a new table in the database
24
CREATE PROCEDURE
Creates a stored procedure
25
CREATE UNIQUE INDEX
Creates a unique index on a table (no duplicate values)
26
CREATE VIEW
Creates a view based on the result set of a SELECT statement
27
DATABASE
Creates or deletes an SQL database
28
DEFAULT
A constraint that provides a default value for a column
29
DELETE
Deletes rows from a table
30
DESC
Sorts the result set in descending order
31
DISTINCT
Selects only distinct (different) values
32
DROP
Deletes a column, constraint, database, index, table, or view
33
DROP COLUMN
Deletes a column in a table
34
DROP CONSTRAINT
Deletes a UNIQUE, PRIMARY KEY, FOREIGN KEY, or CHECK constraint
35
DROP DATABASE
Deletes an existing SQL database
36
DROP DEFAULT
Deletes a DEFAULT constraint
37
DROP INDEX
Deletes an index in a table
38
DROP TABLE
Deletes an existing table in the database
39
DROP VIEW
Deletes a view
40
EXEC
Executes a stored procedure
41
EXISTS
Tests for the existence of any record in a subquery
42
FOREIGN KEY
A constraint that is a key used to link two tables together
43
FROM
Specifies which table to select or delete data from
44
FULL OUTER JOIN
Returns all rows when there is a match in either left table or right table
45
GROUP BY
Groups the result set (used with aggregate functions: COUNT, MAX, MIN, SUM, AVG)
46
HAVING
Used instead of WHERE with aggregate functions
47
IN
Allows you to specify multiple values in a WHERE clause
48
INDEX
Creates or deletes an index in a table
49
INNER JOIN
Returns rows that have matching values in both tables
50
INSERT INTO
Inserts new rows in a table
51
INSERT INTO SELECT
Copies data from one table into another table
52
IS NULL
Tests for empty values
53
IS NOT NULL
Tests for non-empty values
54
JOINJoins tables
55
LEFT JOIN
Returns all rows from the left table, and the matching rows from the right table
56
LIKE
Searches for a specified pattern in a column
57
LIMIT
Specifies the number of records to return in the result set
58
NOT
Only includes rows where a condition is not true
59
NOT NULL
A constraint that enforces a column to not accept NULL values
60
OR
Includes rows where either condition is true
61
ORDER BY
Sorts the result set in ascending or descending order
62
OUTER JOIN
Returns all rows when there is a match in either left table or right table
63
PRIMARY KEY
A constraint that uniquely identifies each record in a database table
64
PROCEDURE
A stored procedure
65
RIGHT JOIN
Returns all rows from the right table, and the matching rows from the left table
66
ROWNUM
Specifies the number of records to return in the result set
67
SELECT
Selects data from a database
68
SELECT DISTINCT
Selects only distinct (different) values
69
SELECT INTO
Copies data from one table into a new table
70
SELECT TOP
Specifies the number of records to return in the result set
71
SET
Specifies which columns and values that should be updated in a table
72
TABLE
Creates a table, or adds, deletes, or modifies columns in a table, or deletes a table or data inside a table
73
TOP
Specifies the number of records to return in the result set
74
TRUNCATE TABLE
Deletes the data inside a table, but not the table itself
75
UNION
Combines the result set of two or more SELECT statements (only distinct values)
76
UNION ALL
Combines the result set of two or more SELECT statements (allows duplicate values)
77
UNIQUE
A constraint that ensures that all values in a column are unique
78
UPDATE
Updates existing rows in a table
79
VALUES
Specifies the values of an INSERT INTO statement
80
VIEW
Creates, updates, or deletes a view
81
WHERE
Filters a result set to include only records that fulfill a specified condition
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Loading...