SQL Scripting Now Generally Available
SQL scripting is now generally available in Databricks SQL, enabling developers to write procedural logic directly in SQL. This includes support for conditional statements, loops, local variables, and exception handling—capabilities previously limited to stored procedures in traditional SQL environments.
Enhanced Parameter and Identifier Support
Parameter markers have been significantly expanded across SQL contexts. Developers can now use named (:param) and unnamed (?) parameter markers in DDL statements, column type definitions, and comments, enabling comprehensive SQL parameterization without SQL injection risks. The IDENTIFIER clause, which casts strings to SQL object names, is now supported in nearly all contexts where identifiers are permitted, including column aliases and column definitions. Additionally, sequential string literals now automatically coalesce into single strings across all contexts.
New Approximate Computation Functions
Two new libraries of sketch-based functions have been added:
- Theta Sketch functions: A comprehensive set of approximate distinct count and set operation functions, including
theta_sketch_agg,theta_union_agg,theta_intersection_agg, and supporting union, difference, and intersection operations. - KLL Sketch functions: Approximately 18 new functions for building KLL sketches for approximate quantile computation, supporting
BIGINT,DOUBLE, andFLOATdata types with aggregate, query, and merge operations.
What Developers Need to Know
Version 2025.40 was first available in Preview on February 11, 2026, and began rolling out to the Current channel on February 23, 2026. Developers can now leverage SQL scripting for complex data transformations, use parameterized queries for enhanced security, and employ sketch-based functions for memory-efficient approximate analytics on large datasets.