SQL glossary
99 SQL terms, from Novice to Master. Start with the basics or jump to a level.
Updated
Novice
- ASC
- An ORDER BY direction that sorts from lower values to higher values.
- BETWEEN Condition
- The BETWEEN condition is used in a WHERE clause to determine if a value is in a given…
- CHECK Constraint
- A constraint requiring inserted or updated rows to satisfy a search condition.
- Column Alias
- A temporary output name assigned to a selected expression or column.
- Comparison Predicate
- A condition comparing values with operators such as =, <>, <, or >=.
- DEFAULT Clause
- A clause providing a value when an INSERT omits the column.
- DESC
- An ORDER BY direction that sorts from higher values to lower values.
- DISTINCT
- A SELECT option that removes duplicate rows from a result.
- FROM
- A query clause identifying the source tables, views, or derived tables.
- Logical Predicate
- A condition that combines or reverses other conditions with AND, OR, or NOT.
- NOT NULL Constraint
- A constraint requiring a column to contain a non-NULL value.
- NULL
- A marker indicating that a value is missing or unknown, rather than zero or an empty string.
- Numeric Literal
- A number written directly in a SQL statement.
- ORDER BY
- A clause that sorts a query result by one or more expressions.
- Query
- A request for data or another result from a database.
- Result Set
- The rows and columns produced by a query.
- SELECT
- A statement or query clause that chooses expressions and columns for a result.
- Snake Case
- All letters are lower case, each word is separated by an underscore.
- SQL Statement
- A complete SQL instruction sent to a database management system.
- String Literal
- Text written between single quotation marks in SQL.
- Structured Query Language (SQL)
- The standardized language for defining, querying, and changing relational data.
- UNIQUE Constraint
- A constraint preventing duplicate values or value combinations in specified columns.
- WHERE
- A query clause keeping only rows for which its condition is true.
Apprentice
- Aggregate Function
- A function that summarizes a set of rows into one value.
- Aggregate Functions
- Aggregate functions are SQL functions that reduce values in one or more rows into a…
- ALTER TABLE
- A statement that changes the definition of an existing table.
- Approximate Numeric Type
- A floating-point numeric type that may store an approximation of a value.
- AVG
- An aggregate function returning the average of non-NULL numeric values.
- BETWEEN Predicate
- A predicate testing whether a value falls within an inclusive lower and upper bound.
- CASE Expression
- An expression that chooses a result by evaluating conditions in order.
- Character String Type
- A SQL type whose values are sequences of characters.
- COUNT
- An aggregate function returning the number of qualifying rows or non-NULL expression values.
- CREATE TABLE
- A statement that defines a new table, its columns, and its constraints.
- CREATE VIEW
- A statement that defines a view from a query.
- CROSS JOIN
- A join returning every possible pairing of rows from two table expressions.
- Data Control Language (DCL)
- SQL statements that control database privileges and access.
- Data Definition Language (DDL)
- SQL statements that define or change database structures.
- Data Manipulation Language (DML)
- SQL statements that retrieve or change stored rows.
- Date and Time Type
- A SQL type representing a date, time, timestamp, or interval.
- DELETE
- A statement that removes selected rows from a table.
- DROP TABLE
- A statement that removes a table definition and its stored data.
- Exact Numeric Type
- A numeric type representing values with defined precision and scale without binary approximation.
- EXCEPT
- A set operation returning distinct rows in the first result but not the second.
- EXISTS Predicate
- A predicate that is true when its subquery returns at least one row.
- FETCH FIRST
- A standard clause limiting a query result to its first specified number of rows.
- FULL OUTER JOIN
- A join returning matched rows plus unmatched rows from both sides.
- GROUP BY
- A clause collecting rows with equal grouping values so each group produces one result row.
- HAVING
- A clause filtering groups after grouping and aggregation.
- IN Predicate
- A predicate testing whether a value equals any value in a list or subquery result.
- INNER JOIN
- A join returning only row combinations that satisfy its join condition.
- INSERT
- A statement that adds new rows to a table.
- INTERSECT
- A set operation returning distinct rows present in both query results.
- IS NULL Predicate
- A predicate testing whether a value is NULL.
- JOIN
- A query operation combining related rows from two table expressions.
- Join Condition
- The predicate deciding which rows from joined sources match.
- LEFT OUTER JOIN
- A join returning every left row and matching right rows, using NULLs when no right match exists.
- LIKE Predicate
- A predicate comparing text with a pattern containing wildcard characters.
- MAX
- An aggregate function returning the highest non-NULL value.
- MIN
- An aggregate function returning the lowest non-NULL value.
- OFFSET Clause
- A clause skipping a specified number of ordered result rows.
- ON Clause
- A join clause containing its match condition.
- RIGHT OUTER JOIN
- A join returning every right row and matching left rows, using NULLs when no left match exists.
- Scalar Subquery
- A subquery required to return one column and no more than one row.
- Self Join
- A query that joins a table to another reference to the same table.
- SET Clause
- The UPDATE clause assigning new values to columns.
- Set Operation
- An operation combining compatible query results according to set rules.
- Subquery
- A query nested inside another SQL statement.
- SUM
- An aggregate function adding the non-NULL numeric values in a group.
- Table Subquery
- A subquery producing rows and columns that another query can use as a table.
- Transaction Control Language (TCL)
- SQL statements that complete, reverse, or mark points within transactions.
- UNION
- A set operation combining compatible query results and removing duplicate rows.
- UNION ALL
- A set operation combining compatible query results while retaining duplicate rows.
- UPDATE
- A statement that changes values in existing rows.
- VALUES Clause
- A clause that supplies rows of literal or calculated values.
- Wildcard Character
- A pattern character representing unknown text, such as % or _ with LIKE.
Journeyman
- Alias
- An Alias is an alternate (usually short) name assigned to a table to make it easier to…
- COMMIT
- A statement that successfully ends a transaction and makes its changes durable.
- Common Table Expression (CTE)
- A named query expression introduced by WITH for use within one statement.
- Correlated Subquery
- A subquery that refers to values from an outer query and is evaluated in that context.
- DENSE_RANK
- A window function assigning equal rank to peers without leaving gaps after ties.
- LAG
- A window function returning a value from an earlier row in the window partition.
- LEAD
- A window function returning a value from a later row in the window partition.
- OVER Clause
- The clause defining the row window used by a window function.
- PARTITION BY
- An OVER subclause dividing query rows into independent window-function groups.
- RANK
- A window function assigning equal rank to peers and leaving gaps after ties.
- READ COMMITTED
- An isolation level preventing a statement from reading uncommitted changes.
- READ UNCOMMITTED
- The isolation level allowing the broadest concurrency and permitting dirty reads.
- Recursive CTE
- A CTE that repeatedly refers to its own accumulated result until no new rows are produced.
- REPEATABLE READ
- An isolation level preventing reread rows from changing during the transaction.
- ROLLBACK
- A statement that reverses a transaction's uncommitted changes.
- ROW_NUMBER
- A window function assigning consecutive numbers to rows within each window partition.
- SAVEPOINT
- A named point inside a transaction to which later work can be rolled back.
- SERIALIZABLE
- The strongest standard isolation level, requiring results consistent with some serial order.
- Window Frame
- The subset of rows around the current row used by a window function.
- Window Function
- A function calculating across related rows without collapsing them into one row per group.
Freelancer
- Deferrable Constraint
- A constraint whose checking may be postponed until transaction completion.
- Initially Deferred
- A constraint mode starting each transaction with checking postponed until commit.
- Initially Immediate
- A constraint mode starting each transaction with checking performed after each statement.
Master
- Natural Join
- A join matching equally named columns automatically and returning one copy of each matched column.