
How NULL Works in Oracle Conditions
Learn why comparisons with NULL are unknown, how that drops rows from results, and how to avoid the NOT IN trap and other NULL surprises.
Explore comprehensive Oracle SQL resources designed for database developers and administrators. Our guides cover everything from basic query construction to advanced techniques for complex joins, analytical functions, and hierarchical data manipulation. Learn practical approaches to performance optimization through execution plan analysis, smart indexing strategies, and efficient table partitioning. Discover best practices for data modeling, constraint management, and large dataset handling that solve real business challenges. Whether you're writing reports, building data warehouses, or maintaining enterprise databases, enhance your Oracle SQL proficiency with our actionable insights.

Learn why comparisons with NULL are unknown, how that drops rows from results, and how to avoid the NOT IN trap and other NULL surprises.

Densify sparse data so every group gets every month or category, by adding PARTITION BY to the sparse side of an outer join.

Find rows that have a match, or none, with EXISTS and NOT EXISTS, without the duplicates of a join or the NULL trap of NOT IN.

Run a subquery once for each row with LATERAL, CROSS APPLY, and OUTER APPLY to get top N per row and several columns per row.

Define vertices and edges over existing tables and query connections with GRAPH_TABLE patterns, either direction, and variable-length paths.

Read a random percentage of a table's rows for quick estimates or test data, make samples repeatable with SEED, and choose row or block sampling.

See data as it was minutes ago, put back rows changed by mistake, and list every committed version of a row with VERSIONS BETWEEN.

Treat query results as arrays of cells and compute projections with spreadsheet-like rules, using UPSERT, CV, PRESENTV, and ITERATE.

Find runs, V shapes, and other sequences in ordered rows with MATCH_RECOGNIZE, using PATTERN, DEFINE, MEASURES, and AFTER MATCH SKIP.

Turn side-by-side columns into rows with UNPIVOT, replace UNION ALL chains, keep NULLs when you need them, and unpivot column groups.

Build cross-tab reports in one query with PIVOT, compute several aggregates, control the grouping, and avoid ORA-56902 when rounding.

Filter rows on ROW_NUMBER, RANK, and other analytic results in one query block with QUALIFY, new in Oracle AI Database 26ai.

Control which rows an analytic function sees with PARTITION BY and ROWS, RANGE, or GROUPS frames, and reuse windows with the WINDOW clause.

Walk trees down and up with START WITH and CONNECT BY, show paths, roots, and leaves, prune branches, and handle loops with NOCYCLE.

Use procedural logic in a single query without creating stored functions, run it in SQLcl, and call it from UPDATE with the WITH_PLSQL hint.

Walk hierarchies and networks to any depth with a recursive common table expression, order the rows with SEARCH, and stop loops with CYCLE.

Name subqueries at the top of a statement so long queries read step by step, chain common table expressions, and reuse them.

Stack, intersect, and subtract query results with UNION, INTERSECT, MINUS, and EXCEPT, including the duplicate-counting ALL versions.