SQL Keywords
SQL Keywords
Keyword Description
ALL Returns true if all of the subquery values meet the condition
ALTER Adds, deletes, or modifies columns in a table, or changes the data type of
a column in a table
ANY Returns true if any of the subquery values meet the condition
CHECK A constraint that limits the value that can be placed in a column
CREATE UNIQUE INDEX Creates a unique index on a table (no duplicate values)
CREATE VIEW Creates a view based on the result set of a SELECT statement
FOREIGN KEY A constraint that is a key used to link two tables together
FULL OUTER JOIN Returns all rows when there is a match in either left table or right table
GROUP BY Groups the result set (used with aggregate functions: COUNT, MAX,
MIN, SUM, AVG)
INNER JOIN Returns rows that have matching values in both tables
INSERT INTO SELECT Copies data from one table into another table
LEFT JOIN Returns all rows from the left table, and the matching rows from the right
table
NOT NULL A constraint that enforces a column to not accept NULL values
OUTER JOIN Returns all rows when there is a match in either left table or right table
PRIMARY KEY A constraint that uniquely identifies each record in a database table
RIGHT JOIN Returns all rows from the right table, and the matching rows from the left
table
SELECT INTO Copies data from one table into a new table
SELECT TOP Specifies the number of records to return in the result set
SET Specifies which columns and values that should be updated in a table
TRUNCATE TABLE Deletes the data inside a table, but not the table itself
UNION Combines the result set of two or more SELECT statements (only distinct
values)
UNION ALL Combines the result set of two or more SELECT statements (allows
duplicate values)
UNIQUE A constraint that ensures that all values in a column are unique
WHERE Filters a result set to include only records that fulfill a specified condition