Oracle 26ai: RETURNING OLD and NEW Values

Oracle 26ai adds the OLD keyword to the existing RETURNING clause complementing the NEW keyword that was already there, and letting you capture both the before and after state of a row in a single atomic DML operation, with no extra SELECT required. The problem Audit logging, change tracking, and before/after comparisons all need both the old and new value of a column. […]

Oracle 26ai: GROUP BY ALL

Oracle 26ai introduces GROUP BY ALL — a shorthand that tells Oracle to automatically include every non-aggregate column from your SELECT list in the grouping, so you never have to enumerate them by hand. The problem Standard SQL requires every non-aggregate column in the SELECT list to appear explicitly in the GROUP BY clause. For […]

Oracle 26ai: QUALIFY clause

Oracle AI Database 26ai introduces the QUALIFY clause — a cleaner way to filter the results of analytic functions without a subquery or Common Table Expression (WITH clause). The problem Analytic functions such as RANK(), ROW_NUMBER(), and AVG() OVER (…) are evaluated after the WHERE clause. This means you cannot reference them directly in a […]

Oracle 23ai: Table Value Constructors

Oracle Database 23ai introduced a useful SQL improvement which is the ability to use a VALUES(…) clause as an inline table within a query. The problem You need a small, hardcoded set of rows, a handful of status codes, a reference list or some test data and ideally without creating a temporary table or a view so […]