SQL Keywords

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/100

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 8:27 PM on 2/1/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

101 Terms

1
New cards
SELECT
Retrieves rows/columns from one or more tables or queries.
2
New cards
FROM
Specifies the source table(s) or subquery for a SELECT/DELETE.
3
New cards
WHERE
Filters rows based on a condition.
4
New cards
JOIN
Combines rows from two tables based on a related condition.
5
New cards
INNER
Join type: returns only matching rows between tables.
6
New cards
LEFT
Join type: returns all left-table rows plus matches from right.
7
New cards
RIGHT
Join type: returns all right-table rows plus matches from left.
8
New cards
FULL
Join type: returns all rows from both sides
9
New cards
CROSS
Join type: Cartesian product of two sets.
10
New cards
ON
Defines the join condition for JOIN.
11
New cards
USING
Specifies common join column(s) by name (where supported).
12
New cards
GROUP
Starts a GROUP BY clause to aggregate rows.
13
New cards
BY
Used in GROUP BY / ORDER BY to name grouping or sorting columns.
14
New cards
HAVING
Filters groups after aggregation.
15
New cards
ORDER
Starts an ORDER BY clause to sort results.
16
New cards
LIMIT
Restricts the number of rows returned (dialect-specific).
17
New cards
OFFSET
Skips a number of rows before returning results.
18
New cards
FETCH
Standard row limiting syntax (e.g.
19
New cards
FIRST
Used with FETCH/SELECT to specify first rows.
20
New cards
TOP
Restricts rows returned (SQL Server-style).
21
New cards
DISTINCT
Removes duplicate rows from a result set.
22
New cards
ALL
Includes all rows (default) or used in set/quantifier contexts.
23
New cards
AS
Assigns an alias to a column/table or expression.
24
New cards
IN
Tests whether a value matches any in a list/subquery.
25
New cards
BETWEEN
Tests whether a value falls within an inclusive range.
26
New cards
LIKE
Pattern matching using wildcards (%
27
New cards
IS
Used for NULL checks and boolean comparisons (e.g.
28
New cards
NULL
Represents missing/unknown value.
29
New cards
NOT
Logical negation of a condition.
30
New cards
AND
Logical conjunction; both conditions must be true.
31
New cards
OR
Logical disjunction; either condition can be true.
32
New cards
EXISTS
Tests for existence (in EXISTS subquery or IF EXISTS in DDL).
33
New cards
ANY
Compares to any value from a subquery/list.
34
New cards
CASE
Conditional expression for if/then/else logic.
35
New cards
WHEN
Defines a condition branch inside CASE.
36
New cards
THEN
Specifies the result for a CASE WHEN branch.
37
New cards
ELSE
Specifies the default result in CASE.
38
New cards
END
Terminates CASE or other block constructs.
39
New cards
WITH
Introduces a common table expression (CTE).
40
New cards
RECURSIVE
Allows a WITH CTE to reference itself recursively.
41
New cards
UNION
Combines results of queries
42
New cards
INTERSECT
Returns rows common to both query results.
43
New cards
EXCEPT
Returns rows in first query not in second (MINUS in Oracle).
44
New cards
UNION ALL
Combines results of queries
45
New cards
INSERT
Adds new rows into a table.
46
New cards
INTO
Specifies target table for INSERT or output for SELECT INTO.
47
New cards
VALUES
Provides literal row values for INSERT.
48
New cards
UPDATE
Modifies existing rows in a table.
49
New cards
SET
Assigns new values to columns in UPDATE.
50
New cards
DELETE
Removes rows from a table.
51
New cards
TRUNCATE
Fast removal of all rows in a table (often non-logged).
52
New cards
MERGE
Upserts: conditionally INSERT/UPDATE/DELETE based on matches.
53
New cards
CREATE
Creates a database object (table
54
New cards
ALTER
Changes the definition of an existing object.
55
New cards
DROP
Removes a database object.
56
New cards
TABLE
Refers to a table object; used in DDL.
57
New cards
VIEW
Virtual table defined by a query.
58
New cards
INDEX
Data structure to speed up lookups/sorts.
59
New cards
UNIQUE
Constraint/index attribute enforcing uniqueness.
60
New cards
PRIMARY
Marks a primary key constraint.
61
New cards
KEY
Defines key columns (PRIMARY KEY/FOREIGN KEY).
62
New cards
FOREIGN
Marks a foreign key constraint.
63
New cards
REFERENCES
Specifies referenced table/columns for a foreign key.
64
New cards
CONSTRAINT
Names/declares a table constraint.
65
New cards
CHECK
Constraint enforcing a boolean condition.
66
New cards
DEFAULT
Provides a default value for a column.
67
New cards
GRANT
Gives privileges/permissions on objects.
68
New cards
REVOKE
Removes previously granted privileges.
69
New cards
ROLE
Defines or refers to a database role.
70
New cards
SCHEMA
Namespace/container for database objects.
71
New cards
BEGIN
Starts a transaction or block.
72
New cards
COMMIT
Persists changes in the current transaction.
73
New cards
ROLLBACK
Undoes changes in the current transaction.
74
New cards
SAVEPOINT
Creates a point to roll back to within a transaction.
75
New cards
TRANSACTION
Refers to transaction control statements.
76
New cards
EXPLAIN
Shows query plan without running (or with analysis options).
77
New cards
CAST
Converts a value to a different data type.
78
New cards
COALESCE
Returns first non-NULL value among arguments.
79
New cards
NULLIF
Returns NULL if two expressions are equal
80
New cards
COUNT
Aggregate: counts rows or non-NULL values.
81
New cards
SUM
Aggregate: sums numeric values.
82
New cards
AVG
Aggregate: computes average of numeric values.
83
New cards
MIN
Aggregate: smallest value.
84
New cards
MAX
Aggregate: largest value.
85
New cards
OVER
Introduces a window function clause.
86
New cards
PARTITION
Defines window partitions (OVER (PARTITION BY ...)).
87
New cards
ROW_NUMBER
Window function: sequential number per partition/order.
88
New cards
RANK
Window function: rank with gaps on ties.
89
New cards
DENSE_RANK
Window function: rank without gaps on ties.
90
New cards
LEAD
Window function: value from following row.
91
New cards
LAG
Window function: value from previous row.
92
New cards
ASC
Sort direction: ascending.
93
New cards
DESC
Sort direction: descending.
94
New cards
WINDOW
Defines a named window specification for window functions (where supported).
95
New cards
ROWS
Window frame unit specifying physical rows (e.g.
96
New cards
RANGE
Window frame unit specifying a value range (e.g.
97
New cards
CURRENT
Used in window frames (e.g.
98
New cards
ROW
Refers to a single row (e.g.
99
New cards
PRECEDING
Window frame boundary before the current row.
100
New cards
FOLLOWING
Window frame boundary after the current row.