|  | 2026-09-04 Friday | SQL: FISCAL
From version 23.26.1 there are a lot of functions available to make it easier to work with calendars, including fiscal calendars. Author: Kim Berg Hansen [60599-10733157] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-08-28 Friday | SQL: Data Manipulation Language Statements
Release 23.26.2 added a wait clause to all DML statements. The syntax for this is: nowait | wait { forever | n [ seconds | milliseconds | microseconds ] }
The default is wait forever. When you specify nowait or a wait duration other than forever, the database raises an error if the DML is blocked by another transaction and it can't obtain the lock in the time specified. Author: Chris Saxon [60659-10734195] | Weekly DB | No New Comments
Last: 2026-09-02 14:45:55 | - |
|  | 2026-08-21 Friday | SQL: Nested With Clause
As of Oracle AI Database 23.26.2, subquery factoring clauses can be nested with some restrictions. Set operations (UNION, MINUS, INTERSECT) and recursive subqueries are both restricted. It is possible to workaround the set operator restriction using inline views. Author: Anthony Harper [60559-10730793] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-08-14 Friday | Oracle PL/SQL: Labeling a PL/SQL Loop
It's often a good idea to label your loops, particularly if they're nested and/or much code within the loop. You can use the label in EXIT statements. You can also make your code more readable by specifying the loop label in the END LOOP statement so you can see which loop it is that ends right here in the code. However, that is just for readability, the compiler does not check whether you specify or correct loop label or not in END LOOP. Author: Kim Berg Hansen [60578-10730757] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-08-07 Friday | Database Design: JSON Data Type
The JSON data type, added in release 21c, optimizes querying and updating JSON data. Release 26ai extended this with type modifiers, enabling you to state whether the JSON values are objects, arrays, or scalars. Author: Chris Saxon [60598-10731748] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-07-31 Friday | SQL: JSON Path Expressions
JSON Path conditional expressions using case and decode were introduced in Oracle AI Database 26.2 Author: Anthony Harper [60518-10729493] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-07-24 Friday | Oracle PL/SQL: PRAGMA SUPPRESSES_WARNING_6009
You can help yourself avoid some potential bugs by setting your database to throw a compile time error if you have a WHEN OTHERS exception block in your code that does not re-raise an error. But what do you then do for those very rare cases where it is actually on purpose to have a WHEN OTHERS without a RAISE, if the database then throws an error? You can use PRAGMA SUPPRESSES_WARNING_6009 to create a procedure or function that the compiler will accept as an alternative to RAISE or RAISE_APPLICATION_ERROR. Author: Kim Berg Hansen [60560-10730117] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-07-17 Friday | SQL: Domain DDL
Added in release 26ai, usecase domains help you describe values. A single column domain has a data type and many optional properties including: strict (the domain and table column's data types must match exactly)default valuenot null constraintcollatecheck constraint
Author: Chris Saxon [60500-10729522] | Weekly DB | No New Comments
Last: 2026-07-20 14:11:56 | - |
|  | 2026-07-10 Friday | SQL: DATEDIFF
Function DATEDIFF give us an easy way to determine number of years, months, hours (or basically any time unit) between two dates. Author: Kim Berg Hansen [60501-10729102] | Weekly DB | No New Comments
Last: 2026-07-15 06:00:57 | - |
|  | 2026-07-03 Friday | Oracle PL/SQL: Datetime Functions
System time functions in an SQL query will always return the time when the query began executing. To report row by row timing information for a time intensive process in SQL it is necessary to leverage PL/SQL functionality. Author: Anthony Harper [50769-10724495] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-06-26 Friday | SQL: PHONIC_ENCODE
Added in 23.4, you can use phonic_encode to do sounds like matching. This can use the standard and alternate double metaphone algorithms to encode strings based on their pronunciation. Author: Chris Saxon [60376-10727573] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-06-19 Friday | Oracle PL/SQL: Vector Distance Functions
The Hamming vector distance metric is available in PL/SQL, but only as a metric specification for the VECTOR_DISTANCE function. The HAMMING_DISTANCE function is not supported in PL/SQL for comparing binary vectors. Author: Anthony Harper [60236-10724472] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-06-12 Friday | SQL: GRAPH_TABLE Operator
A property graph can be used as an alternative to hierarchical queries. If you wish, you can setup duplex edges, which can make your code more self-documenting. Author: Kim Berg Hansen [60336-10726497] | Weekly DB | No New Comments Objections: SUBMITTED Last: 2026-06-07 16:00:24 | - |
|  | 2026-06-05 Friday | SQL: Assertion DDL
Oracle AI Database 23.26.1 added assertions. These enable you to create cross-row constraints. The basic syntax for these is: create assertion <assertion_name> check ( <Boolean expression> )
The Boolean expression can use exists, not exists, or the new all … satify expression. Author: Chris Saxon [60296-10725765] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-05-29 Friday | SQL: Filtered Aggregation
Filtered Aggregates, introduced in 26.1 simplify the syntax required to aggregate different elements of groupings independently. Author: Anthony Harper [60196-10722646] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-05-22 Friday | SQL: QUALIFY Clause
Just like we are used to using HAVING clause like a “where” clause on the results of aggregate functions, from version 23.26.0 we can use the QUALIFY clause like a “where” clause on the results of analytic functions. Author: Kim Berg Hansen [60216-10723650] | Weekly DB | No New Comments
Last: 2026-05-20 22:10:42 | - |
|  | 2026-05-15 Friday | SQL: GRAPH_TABLE Operator
The graph_table operator, added in 26ai, enables you to traverse graphs using SQL. You can match a variable number of edges between to points in the graph with regular expression-like {m,n} syntax. This finds a route with at least m and and most n rows. Author: Chris Saxon [60176-10722763] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-05-08 Friday | SQL: Datetime Format Models
ISO week numbers are not always sequential week numbers. A simple user request can have hidden complexity that requires analytics to solve. Author: Anthony Harper [50589-10720906] | Weekly DB | No New Comments
Last: 2026-05-03 20:06:51 | - |
|  | 2026-05-01 Friday | SQL: Boolean Expressions
Using boolean expressions can both simplify and clarify your code. Author: Kim Berg Hansen [60138-10720986] | Weekly DB | No New Comments
Last: 2026-04-29 18:54:47 | - |
|  | 2026-04-24 Friday | SQL: Table DDL
Oracle AI Database 26ai introduced the if [not] exists clause for DDL statements. This works as follows: create … if not exists … => no action or error if there is already an object with this name in the schema.alter … if exists … => no action or error if there is not an object with this name in the schema.drop … if exists … => no action or error if there is not an object with this name in the schema.
Author: Chris Saxon [60115-10720982] | Weekly DB | No New Comments
Last: 2026-04-18 11:23:08 | - |
|  | 2026-04-17 Friday | Oracle PL/SQL: Cursor Iteration Controls
A collection can be populated using a cursor iteration control as a qualified expression. If the iteration control is based on a weak cursor variable, the iterator type must be defined. Author: Anthony Harper [60135-10720833] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-04-10 Friday | Oracle PL/SQL: ENCODE
UTL_URL.ENCODE can URL encode a string in multiple ways - you need to think about the values you pass in to the parameters of the function. Take particular note that the parameter for characterset behaves a bit different than many functions. You're probably used to passing a NULL behaves the same as not passing a value (ie. relying on the default.) This is not the case here, where a NULL means database character set, while the default is the characterset of UTL_HTTP.GET_BODY_CHARSET, which currently defaults to ISO-8859-1. Author: Kim Berg Hansen [60075-10720247] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-04-03 Friday | SQL: QUALIFY Clause
Oracle AI Database release 23.26.0 introduced the qualify clause. This enables you to filter the output of window functions. Author: Chris Saxon [60055-10719502] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-03-27 Friday | SQL: Filtered Aggregation
Oracle AI Database 23.26.1.0 Introduced support for filtered aggregates, simplifying aggregation of different elements within the same grouping. Author: Anthony Harper [59995-10717543] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-03-20 Friday | SQL: UUID_TO_RAW
UUID_TO_RAW provides an easy way to turn a UUID string into RAW, no matter which of the 4 supported syntaxes the string is using. If you don't want an error raised on invalid UUID values, test with IS_UUID before converting. Author: Kim Berg Hansen [60035-10718476] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-03-13 Friday | SQL: INSERT Statement
Oracle AI Database release 23.9 introduced non-positional inserts. This enables update-like set clauses for insert statements. insert into <table_name>
set <column_name> = <value>, <column_name> = <value>, ...
You can load many rows in one non-positional insert. To do this, wrap each row with parentheses and place a comma between each row. Author: Chris Saxon [59975-10717626] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-03-06 Friday | Oracle PL/SQL: Guidelines for Boolean Expressions
The IS [NOT] TRUE boolean test condition is only valid syntax in SQL. In PL/SQL the same test has to use the equality operator. Author: Anthony Harper [59935-10716429] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-02-27 Friday | Oracle PL/SQL: Iteration Controls
Iteration controls allow us in many situations to create concise and simple logic without needing extraneous variables and code. Author: Kim Berg Hansen [59915-10715936] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-02-20 Friday | SQL: Analytic Functions
Oracle Database 21c, introduced the groups frame for window functions. This is a hybrid between rows physical offsets and range logical offsets: - Rows with the same value for the sort keys are in the same group, like
range. - Offsets are calculated as the number of groups, like
rows.
Author: Chris Saxon [59876-10715387] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-02-13 Friday | SQL: Multicolumn Usecase Domains
Creating a use case domain with a domain order function standardizes the ordering of queries on tables using the domain without duplicating the order clasue in each SQL statement. Author: Anthony Harper [59835-10714620] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-02-06 Friday | SQL: Date, Timestamp and Interval Types
CAST of a TIMESTAMP WITH TIME ZONE to a DATE (whether explicit or implicit) simply removes the time zone information from the value. If you instead want your DATE to contain the timestamp value with time zone converted to for example the database time zone, you need to first convert, then cast. Author: Kim Berg Hansen [59877-10714874] | Weekly DB | No New Comments
Last: 2026-02-09 07:14:44 | - |
|  | 2026-01-30 Friday | Oracle PL/SQL: The FOR LOOP Statement
Release 21c of Oracle AI Database extended for loops in PL/SQL. New options include: by - specify a custom incrementwhen <condition> - only run the loop body if the condition is true- A comma-separated list of values to loop through
Author: Chris Saxon [59795-10714205] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-01-29 Thursday | SQL: JSON_TRANSFORM
It is possible to pass multiple arguments in a single bind variable with the PASSING clause if the bind variable is using JSON datatype. Author: Anthony Harper [59655-10713063] | Oracle Database Annual Championship | No Comments Last: No Comments | - |
|  | 2026-01-29 Thursday | Oracle PL/SQL: Calling Macros From PLSQL
SQL Macros used in PL/SQL methods are resolved at compile time. Author: Anthony Harper [59776-10713152] | Oracle Database Annual Championship | No New Comments
Last: 2026-02-01 15:35:29 | - |
|  | 2026-01-29 Thursday | SQL: GRAPHQL Table Function
GraphQL is an alternative way to query data and retrieve JSON than using SQL. You can use the table function GRAPHQL to use GraphQL syntax within Oracle database. Author: Kim Berg Hansen [59195-10713027] | Oracle Database Annual Championship | No Comments Last: No Comments | - |
|  | 2026-01-29 Thursday | Database Administration: Statistics
From release update 23.8, the optimizer can gather dynamic stats for table function calls. This can give better row estimates. You can control this with: - The global PL/SQL
dynamic_stats preference - The
dynamic_stats function preference - The parameter
plsql_function_dynamic_stats
The priority of these (from highest to lowest) is: plsql_function_dynamic_stats > Function preference > Global preference
Author: Chris Saxon [59815-10714274] | Oracle Database Annual Championship | No Comments Last: No Comments | - |
|  | 2026-01-29 Thursday | SQL: FUZZY_MATCH
Oracle AI Database added the fuzzy_match operator. This supports several fuzzy matching algorithms: LEVENSHTEIN corresponds to UTL_MATCH.EDIT_DISTANCE or UTL_MATCH.EDIT_SIMILARITY and gives a measure of character edit distance or similarity.DAMERAU_LEVENSHTEIN distance differs from the classical LEVENSHTEIN distance by including transpositions among its allowable operations in addition to the three classical single-character edit operations (insertions, deletions and substitutions).JARO_WINKLER corresponds to UTL_MATCH.JARO_WINKLER (a percentage between 0-1) or UTL_MATCH.JARO_WINKLER_SIMILARITY (the same but scaled from 0-100).BIGRAM and TRIGRAM are instances of the N-gram matching technique, which counts the number of common contiguous substrings (grams) between the two strings.WHOLE_WORD_MATCH corresponds to Word Match Percentage or Count comparison in Oracle Enterprise Data Quality. It calculates the LEVENSHTEIN or edit distance of two phrases with words (instead of letters) as matching units.LONGEST_COMMON_SUBSTRING finds the longest common substring between the two strings.
Author: Chris Saxon [59715-10714024] | Oracle Database Annual Championship | No Comments Last: No Comments | - |
|  | 2026-01-29 Thursday | SQL: Hidden and Generated Fields
Hidden and generated fields in version 23.6 gives you more flexibility for read-only attributes of JSON Relational Duality Views. Author: Kim Berg Hansen [59735-10713069] | Oracle Database Annual Championship | No Comments Last: No Comments | - |
|  | 2026-01-23 Friday | SQL: QUALIFY Clause
Introduced in 26ai, the QUALIFY clause allows for filtering a result set with an analytic function, or any aliased expression. Author: Anthony Harper [59415-10711927] | Weekly DB | No New Comments
Last: 2026-01-17 22:17:15 | - |
|  | 2026-01-16 Friday | SQL: JSON_OBJECT
If you need to create JSON with empty strings ("") from SQL values, that will not happen by default, as an empty string in SQL is actually a NULL and will produce a JSON null. But in JSON creation functions you can specify EMPTY STRING ON NULL to make SQL NULL turn into JSON "" empty string Author: Kim Berg Hansen [59539-10712161] | Weekly DB | No New Comments
Last: 2026-01-13 09:59:38 | - |
|  | 2026-01-09 Friday | SQL: TIME_BUCKET
The time_bucket function find the start or end times of an N-unit duration for a datetime. This was added in release 23.7. The syntax for this is: time_bucket ( <datetime>, <stride>, <origin> )
There is an optional fourth parameter, which takes the values start or end. The data type of the first and third arguments must be identical. The second argument can be either a: - An
interval day to second or interval year to month literal - A call to
numto*interval function - An ISO 8601 time unit string
Author: Chris Saxon [59435-10710370] | Weekly DB | No Comments Last: No Comments | - |
|  | 2026-01-02 Friday | SQL: CONCAT
In 23ai, support for multiple arguments was added to the concat function. Author: Anthony Harper [59295-10707606] | Weekly DB | No New Comments
Last: 2026-01-06 08:48:37 | - |