2026 SQL improvements¶
The following SQL improvements were introduced in 2026:
| Date released | Improvement | Impact |
|---|---|---|
| May 2026 | New CREATE OR REPLACE PROCEDURE SCOPED TEMP TABLE syntax inside stored procedure bodies. The table exists only for the duration of a single procedure execution and is automatically dropped when the procedure ends. | You can use a temporary table inside a stored procedure without leaving it visible to the rest of the session, simplifying cleanup and avoiding name collisions across calls. |
| May 2026 | Preview support for CREATE OR ALTER SEMANTIC VIEW. You can use CREATE OR ALTER <object> to create a semantic view if it doesn’t exist, or alter an existing one to match the definition in the statement. | Provides a declarative way to manage semantic view definitions that’s safe to re-run without having to replace the view and re-grant privileges. |
| May 2026 | Cortex AI function updates: extraction scores for AI_EXTRACT reach general availability, AI_CLASSIFY gains preview support for document inputs, and AI_COMPLETE gains preview support for video and audio inputs. | You can request confidence scores from AI_EXTRACT, classify entire document files (PDF, DOCX, and so on) with AI_CLASSIFY, and run multimodal video and audio analysis with AI_COMPLETE. |
| April 2026 | Cortex AI function general availability: AI_COMPLETE document intelligence and AI_PARSE_DOCUMENT image extraction in LAYOUT mode. | You can use document inputs with AI_COMPLETE in production, and AI_PARSE_DOCUMENT now extracts images alongside text and layout for richer multimodal pipelines. |
| April 2026 | You can use COUNT with DISTINCT in a window function when the COUNT OVER clause includes ORDER BY, provided DISTINCT applies to a single column expression. | You can compute distinct counts within ordered window frames without having to rewrite the query as a subquery or self-join. |
| April 2026 | CHECK constraints for standard tables are now generally available. A CHECK constraint enforces a condition on the values that can be inserted into or updated in one or more columns of a table. | Any INSERT or UPDATE operation that violates the constraint results in an error, so you can declaratively enforce data integrity rules in standard tables. You can define CHECK constraints inline as part of a column definition or out-of-line in a separate clause. |
| March 2026 | Cortex AI function enhancements: AI_COMPLETE gains preview support for document inputs (PDFs and Microsoft Word files), and AI_EXTRACT is updated. | You can pass staged documents directly to AI_COMPLETE for reasoning over text, charts, tables, and structured data, alongside existing text and image inputs. |
| March 2026 | New ARRAY_REPEAT function. | You can return an ARRAY value containing a specified number of copies of an element. |
| March 2026 | New MAP_ENTRIES function. | You can return an ARRAY of key-value pair objects for each entry in a MAP value. |
| March 2026 | Preview support for interval data types, including INTERVAL YEAR TO MONTH and INTERVAL DAY TO SECOND. | You can store values that represent a duration of time, and you can calculate intervals as the difference between two dates or times. |
| March 2026 | Support for DML error logging on tables. When this feature is turned on for a table, DML statements can continue when a supported error occurs, and errors are logged in an error table associated with the base table. | You can keep DML pipelines running through row-level errors without losing visibility into the rows that failed. |
| March 2026 | Additional date and time formats: Y, MO, D, H24, H12, HH, H, ME, S, and P. | You can format date and time values with more granular and standardized format elements without writing custom expressions. |
| March 2026 | Additional fixed-position numeric format models: % and parameterized TM9. | You can convert numeric values to and from text strings using more flexible format models. |
| March 2026 | Support for user-defined types. You can define a new data type once based on an existing Snowflake data type and then use it in multiple objects. | Simplifies schema maintenance and improves data quality. For example, you can define a data type named age that corresponds to NUMBER(3,0) or a data type named address that is a structured OBJECT type. |
| March 2026 | You can use standard SQL clauses to query semantic views (now generally available). You can specify the name of the semantic view in the FROM clause of a SELECT statement instead of using the SEMANTIC_VIEW clause. | You can query semantic views using familiar SELECT, GROUP BY, and ORDER BY syntax, making it easier to integrate semantic views into existing SQL workflows and tools. |
| February 2026 | New IS_DATABASE_ROLE_ACTIVATED (SYS_CONTEXT function) context function. | You can determine whether a specified database role is activated in the current session. |
| January 2026 | The following Cortex AI SQL functions are now generally available: AI_FILTER, AI_AGG, AI_SUMMARIZE_AGG, and AI_COUNT_TOKENS. | You can use natural-language predicates with AI_FILTER, run set-based AI aggregations with AI_AGG and AI_SUMMARIZE_AGG, and estimate token usage before running AI prompts with AI_COUNT_TOKENS. |
| January 2026 | New UUID data type for storing universally unique identifiers. | You can use a dedicated data type to store UUID values instead of relying on VARCHAR or BINARY columns. |
| January 2026 | The Apache DataSketches HLL functions are now generally available: DATASKETCHES_HLL, DATASKETCHES_HLL_ACCUMULATE, DATASKETCHES_HLL_COMBINE, and DATASKETCHES_HLL_ESTIMATE. | You can produce, combine, and consume HLL sketches for approximate distinct cardinality estimation, including across systems that use the Apache DataSketches sketch format. |
| January 2026 | The ability to retrieve bind variable values is now generally available. You can call the BIND_VALUES table function in INFORMATION_SCHEMA, and bind values for past queries are visible in the bind_values column of the QUERY_HISTORY Account Usage view and the QUERY_HISTORY function. | You can inspect the literal values bound into a query, which simplifies debugging and auditing for code that uses bind variables, including JavaScript and Snowflake Scripting. |