SQLite 3.52.0 Closes a Decade-Long ALTER TABLE Gap and Ships a New Query Formatter
SQLite 3.52.0, expected to release around March 11, 2026, will add ALTER TABLE support for NOT NULL and CHECK constraints, a new Query Result Formatter for the CLI, two new JSON array functions, and query planner improvements.
Overview
SQLite 3.52.0, projected to release around March 11, 2026, delivers a set of changes that developers who rely on SQLite for schema migrations, CLI work, and JSON handling will find immediately useful. The headline addition — ALTER TABLE support for NOT NULL and CHECK constraints — addresses a limitation that has forced developers to use awkward multi-step workarounds for years. The release is accompanied by a new Query Result Formatter library, expanded JSON functions, and a round of query planner improvements. As of publication, the release remains in draft status; the final release notes are available at sqlite.org once the version ships.
Closing the ALTER TABLE Gap
SQLite’s ALTER TABLE command has historically been one of the most constrained in any relational database. For years, direct schema modifications were limited to renaming tables, renaming columns, adding columns, and (since 3.35.0) dropping columns. Modifying constraints on existing tables required a twelve-step procedure documented on the SQLite ALTER TABLE reference page: disable foreign key enforcement, start a transaction, create a new table with the desired schema, copy data across, drop the old table, rename the new one, and rebuild all indexes, triggers, and views that depended on it.
SQLite 3.52.0 will shorten this path significantly. According to the draft release notes, the release will permit adding and removing NOT NULL and CHECK constraints through ALTER TABLE directly. This is a structural change to what the engine accepts in a single statement, reducing the risk of partial migrations and the operational overhead of managing transaction-based table rebuilds for what is a routine schema change in other databases.
The limitation predated many of the tooling ecosystems that grew up around SQLite. ORM migration tools such as Alembic, Flyway, and Knex have all implemented SQLite-specific workarounds internally when a migration touches constraints. The 3.52.0 change should allow these tools to simplify their SQLite code paths over time.
According to the pre-release forum announcement, SQLite lead developer Richard Hipp announced plans for the release on 2026-02-18, approximately three weeks before the projected ship date, and invited the community to test trunk code, which led to community reports of a display encoding issue in QRF output under certain environments, a floating-point rounding discrepancy, and a missing function from the release notes — all addressed before final release.
Query Result Formatter
The release introduces the Query Result Formatter (QRF), a new library for displaying SQL query results with improved readability on fixed-pitch terminal displays. According to the draft release notes, the CLI’s interactive mode will default to QRF output, rendering tabular results in Unicode box-drawing characters rather than the plain pipe-delimited format that has been the SQLite CLI’s standard display for decades. Batch (non-interactive) sessions will retain the legacy format for compatibility with scripts that parse CLI output.
Numeric values will be right-justified by default in tabular output modes, a convention familiar from spreadsheets and data display tools that makes numeric columns easier to scan vertically. The .mode command received enhancements to support the new formatting options, and bare semicolons at the end of dot-commands will be silently ignored — a change flagged in the draft release notes as a potential compatibility issue for scripts that previously relied on the error behavior.
QRF is also exposed through the TCL interface via a new format method, making it accessible to developers building tools on the TCL bindings. Command-line scripts with .sql or .txt extensions will be loadable directly as command-line arguments.
New JSON Functions
The release adds json_array_insert() and its binary-JSON counterpart jsonb_array_insert() to SQLite’s JSON function library. The functions close a gap in the existing JSON array manipulation API: while SQLite has long offered functions to extract, modify, and append to JSON arrays, inserting a value at an arbitrary position within an array previously required constructing a workaround from multiple function calls.
json_array_insert() accepts a JSON document, a path expression pointing to an array position, and a value to insert at that position. Elements at or after the insertion point shift right. The jsonb_array_insert() variant operates on SQLite’s binary JSON (JSONB) format for applications that store JSON in the compact binary representation introduced in earlier releases.
Query Planner Optimizations
The 3.52.0 query planner receives improvements targeting common query patterns. According to the draft release notes, set operations — UNION, EXCEPT, and INTERSECT — will use a sort-and-merge strategy in more cases, avoiding full materializations that were previously required. Join order selection for large multi-way joins on star schemas — a common pattern in analytical queries — is improved, and the EXISTS-to-JOIN optimization will apply in more circumstances.
GROUP BY and ORDER BY queries benefit from additional optimization paths, and DISTINCT queries against virtual tables see improved index use.
Floating-Point Precision Change
A potentially breaking change in 3.52.0 affects how SQLite converts floating-point numbers to text. The default rounding for float-to-text conversions will increase from 15 significant digits to 17, according to the draft release notes. The 17-digit default is the minimum needed to round-trip IEEE 754 double-precision values without loss of information — a well-established standard used by most modern languages and runtimes.
Applications that compare text representations of floating-point numbers, export results as CSV or JSON with a specific digit count, or rely on SQLite’s text output matching historical behavior should test against the new default before upgrading. The behavior will be configurable via the new SQLITE_DBCONFIG_FP_DIGITS option in the C API, allowing applications to restore 15-digit behavior if needed. Float-to-text and text-to-float conversion performance also improves in this release.
C API Additions
The C API expands with three new functions: sqlite3_str_truncate() for trimming dynamic strings, sqlite3_str_free() for freeing them, and sqlite3_carray_bind_v2() for binding array values to prepared statements. New constants include SQLITE_PREPARE_FROM_DDL for sqlite3_prepare_v3(), SQLITE_UTF8_ZT for text encoding, and configuration options SQLITE_LIMIT_PARSER_DEPTH and SQLITE_DBCONFIG_FP_DIGITS.
TEMP triggers will gain the ability to read and modify tables in the main schema, a restriction that previously required workarounds for trigger logic that needed to touch non-temporary tables. VACUUM INTO gains support for reserve=N query parameters in URI filenames for setting reserve bytes. Windows RT support is discontinued.
What We Don’t Know
The ALTER TABLE constraint changes cover NOT NULL and CHECK constraints specifically; it is not yet clear whether future releases will extend this to other constraint types such as DEFAULT values or foreign key constraint modifications, which still require the twelve-step table-rebuild approach. SQLite’s team has not published a roadmap indicating when or whether those remaining gaps might be addressed.
SQLite 3.52.0 is expected to be available from the official SQLite downloads page around March 11, 2026. The engine remains in the public domain with no dependencies, and the amalgamation distribution — a single C source file — continues to be the standard integration path for the billions of deployments across mobile operating systems, browsers, and embedded devices.