A–Z of Oracle SQL
Every statement, clause and function the guide covers. 140 of 141 have their pages; anything still marked coming needs a database feature we can't test yet.
A
AFTER MATCH SKIP19c+where the next match starts · Clause6.6ALTER TABLE19c+change a table · Statement10.0 10.2Annotations26ai onlyname/value labels on objects · Clause12.7ANY_VALUE19c+any one value from a group · Function3.3APPROX_COUNT_DISTINCT19c+fast approximate distinct count · Function1.5AVG19c+average · Function3.0 4.0 5.6
B
C
CASE19c+if/then in SQL · Function1.4 3.3 7.0 12.1CEIL / FLOOR for dates26ai onlyround a date up or down · Function12.8CLASSIFIER / MATCH_NUMBER19c+labels for matched rows · Function6.3COALESCE19c+first non-null · Function1.2COMMENT ON19c+describe a table or column · Statement12.7COMMIT / ROLLBACK / SAVEPOINT19c+transactions · Statement9.0CONNECT BY / START WITH19c+Oracle's hierarchical queries · Clause4.1 13.0Constraints (PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK)19c+rules on data · Clause10.0Correlated subquery19c+a subquery that refers to the outer row · Clause4.0 5.1 5.7 9.2COUNT19c+count rows or values · Function1.5 3.0 3.3 4.2CREATE INDEX19c+faster lookups · Statement10.3 14.1CREATE SEQUENCE19c+number generators · Statement10.1CREATE TABLE19c+make a table · Statement10.0 10.1 10.4CREATE TABLE AS SELECT19c+make a table from a query · Statement10.2 10.3CREATE VIEW19c+a saved query · Statement10.3CROSS APPLY / OUTER APPLY19c+LATERAL, SQL Server style · Clause2.4 5.3 8.3CROSS JOIN19c+every combination · Clause2.4 7.1 13.3CUBE19c+every combination of subtotals · Clause3.1
D
DECODE19c+Oracle's older CASE · Function1.4DEFINE19c+what each pattern variable means · Clause6.0 6.1DELETE19c+remove rows · Statement9.4DISTINCT19c+remove duplicate rows · Clause1.5 3.2Domains26ai onlyreusable column types (coming: needs a database that allows them) · Clause12.7DROP TABLE / PURGE19c+remove a table · Statement10.2DUAL19c+the one-row table12.1
E
F
G
GRAPH_TABLE / property graphs26ai onlygraph queries in SQL (coming) · ClausePart 12, comingGROUP BY19c+one row per group · Clause1.4 1.5 2.2 3.0GROUP BY alias / position26ai onlygroup by a SELECT alias or column number · Clause12.2GROUPING / GROUPING_ID19c+which rows are subtotals · Function3.1GROUPING SETS19c+exactly the subtotals you list · Clause3.1GROUPS frame26ai onlyframes counted in groups of equal values · Clause12.4
H
I
Identity columns19c+auto-numbered keys · Clause10.0 10.1IF [NOT] EXISTS19c+DDL that doesn't fail (19.28 and later) · Clause12.7IN / NOT IN19c+a list of values · Operator1.1 1.2 2.3INNER JOIN19c+matching rows from both · Clause1.1 2.0 2.2 14.2INSERT19c+add rows · Statement9.0 9.1 9.3 9.5INSERT ALL / INSERT FIRST19c+one statement, several inserts · Statement9.1 12.3INTERSECT / MINUS19c+common rows, rows in one not the other · Operator1.2 2.3 4.2 12.5 13.2IS JSON19c+check that text is valid JSON · Operator11.1IS NULL / IS NOT NULL19c+test for null · Operator1.2IS TRUE / IS NOT TRUE26ai onlyboolean tests that handle null · Operator12.1
J
JSON data type26ai onlynative JSON storage · Type11.2JSON dot notation19c+doc.innings[0].runs · Operator11.1 11.2JSON Relational Duality views26ai onlytables and documents at once · Statement11.2JSON_OBJECT / JSON_ARRAYAGG19c+build JSON · Function11.0JSON_TABLE19c+JSON to rows · Function11.1JSON_VALUE / JSON_QUERY / JSON_EXISTS19c+read JSON · Function11.1
K
L
LAG / LEAD19c+the row before or after · Function5.3 6.3 6.4 6.6 13.1LATERAL19c+a subquery that sees the row before it · Clause2.4 7.1 8.3LEAST / GREATEST19c+smallest or largest of a list · Function13.3LEFT / RIGHT OUTER JOIN19c+keep unmatched rows from one side · Clause0.3 1.3 2.0 2.1 2.3LIKE19c+simple patterns in text · Operator1.1LISTAGG19c+join values into a string · Function3.2 7.2 11.0LNNVL19c+true when a condition is false or unknown · Function12.1LOG ERRORS19c+keep going past bad rows · Clause9.5
M
MATCH_RECOGNIZE19c+regular expressions over rows · Clause6.0 6.1 6.8 6.11 13.1MEASURES19c+the columns for each match · Clause6.0 6.1 6.2MERGE19c+insert or update in one statement · Statement9.2 9.3 12.6MIN / MAX19c+smallest, largest · Function3.3MINUS ALL / INTERSECT ALL26ai onlyset operators that count duplicates · Operator12.5Multi-row INSERT ... VALUES26ai onlyseveral rows in one VALUES · Statement9.0 12.3
N
NATURAL JOIN / USING19c+join on same-named columns · Clause2.0NEXT_DAY / ADD_MONTHS / LAST_DAY19c+date arithmetic · Function12.8NTILE19c+split into buckets · Function5.5NULLIF19c+null when equal · Function1.2NULLS FIRST / NULLS LAST19c+where nulls sort · Clause1.3NUMTODSINTERVAL / EXTRACT19c+intervals and their parts · Function12.8NVL19c+replace null · Function1.2NVL219c+one value if null, another if not · Function1.2
O
P
Partitioning19c+split big tables · Clause10.4PATTERN19c+the row pattern · Clause6.0 6.1 6.4Pattern exclusion {- -}19c+match rows without returning them · Operator6.9PERCENT_RANK / CUME_DIST19c+relative position · Function5.5 8.2PERMUTE19c+variables in any order · Operator6.7PIVOT19c+rows to columns · Clause7.0 7.2PREV / NEXT / FIRST / LAST19c+navigation inside a match · Function6.5
Q
R
RANK / DENSE_RANK19c+positions with ties · Function5.1 5.7 8.0 12.2RATIO_TO_REPORT19c+share of the total · Function5.0Recursive WITH19c+a query that refers to itself · Clause4.1 13.0REGEXP_SUBSTR / REGEXP_LIKE / REGEXP_INSTR / REGEXP_COUNT19c+regular expressions on text · Function1.6 11.3RETURNING19c+get values back from DML · Clause9.0 12.6RETURNING OLD / NEW26ai onlyvalues before and after the change · Clause12.6ROLLUP19c+subtotals and a grand total · Clause3.1ROWID19c+a row's physical address9.4ROWNUM19c+the old top-n8.0 8.1ROWS / RANGE frames19c+which rows a window covers · Clause5.2 5.4 5.6 12.4ROW_NUMBER19c+1, 2, 3 in order · Function5.1 5.3 5.7 6.1 8.0 8.1 8.2 9.4 12.2 13.1RUNNING / FINAL19c+measures as of each row or the whole match · Clause6.10Running totals19c+SUM() OVER (ORDER BY ...)4.1 5.2 6.1 6.5 6.8
S
SELECT19c+read rows · Statement1.0SELECT ... FOR UPDATE19c+lock rows you're about to change · Clause9.2 12.6SELECT without FROM26ai onlyno more FROM dual · Statement12.1Self join19c+a table joined to itself · Clause13.3SQL macros19c+reusable query templates · Clause4.4Subquery (scalar, inline view)19c+a query inside a query · Clause2.1 4.0SUBSET19c+one name for several variables · Clause6.7SUBSTR / INSTR / REPLACE / TRIM / LPAD19c+everyday text functions · Function1.6SUM19c+add up · Function3.0 3.3 5.0 5.2 7.0SUM / AVG of INTERVAL26ai onlyadd up durations · Function12.8
T
U
V
W
WHERE19c+keep some rows · Clause1.1WINDOW clause26ai onlyname a window once · Clause6.3 12.4WITH (common table expression)19c+name a subquery · Clause2.2 4.1 4.3 12.3WITH FUNCTION19c+PL/SQL inside a query · Clause4.3 4.4WITH TIES19c+keep rows tied with the last one · Clause8.0 8.3WITH UNMATCHED ROWS19c+show rows outside any match · Clause6.9
X
Nothing matches. Try a shorter word.