Skip to content

/compat/sqlite/sqlite-feature-versions

SQLite feature versions: RETURNING, STRICT, ->> and DROP COLUMN

verified onenvironmentlocal · windows 10.0.26200 arm64 · GNU bash 5.3.15 (Git Bash)updated 2026-10-20
tool
SQLite
versions
SQLite 3.25 – 3.53
os
any

SQLite is embedded in your language runtime or operating system, so the version you get depends on where the library comes from, not on a server you install. Check it before using newer syntax: select sqlite_version();, or sqlite3.sqlite_version in Python.

Feature table

FeatureSince
Window functions (OVER)3.25.0
ALTER TABLE … RENAME COLUMN3.25.0
UPSERT (INSERT … ON CONFLICT DO UPDATE)3.24.0
Generated columns3.31.0
iif()3.32.0
RETURNING3.35.0
ALTER TABLE … DROP COLUMN3.35.0
STRICT tables3.37.0
-> and ->> JSON operators, unixepoch()3.38.0
JSON functions built in by default3.38.0
JSONB functions (jsonb_*)3.45.0
concat(), concat_ws()3.44.0

Check what your SQLite supports

bash
python - <<'EOF'
import sqlite3
db = sqlite3.connect(":memory:")
print("SQLite", sqlite3.sqlite_version)
tests = {
    "RETURNING": "create table t (id integer primary key, n int); insert into t (n) values (1) returning id",
    "STRICT": "create table s (n int) strict",
    "->> operator": """select '{"a":[1,2]}' ->> '$.a[1]'""",
    "unixepoch()": "select unixepoch('2026-01-01')",
    "concat_ws()": "select concat_ws('-', 'a', 'b')",
    "DROP COLUMN": "create table d (a, b); alter table d drop column b",
}
for name, sql in tests.items():
    try:
        *_, last = sql.split("; ")
        for stmt in sql.split("; ")[:-1]:
            db.execute(stmt)
        print(f"{name:14} ok   {db.execute(last).fetchall()}")
    except sqlite3.Error as e:
        print(f"{name:14} no   {e}")
try:
    db.execute("insert into s values ('x')")
except sqlite3.Error as e:
    print(f"{'STRICT check':14} ok   {e}")
EOF

Output

SQLite 3.53.1
RETURNING      ok   [(1,)]
STRICT         ok   []
->> operator   ok   [(2,)]
unixepoch()    ok   [(1767225600,)]
concat_ws()    ok   [('a-b',)]
DROP COLUMN    ok   []
STRICT check   ok   cannot store TEXT value in INT column s.n

Where SQLite versions come from

  • Python: the sqlite3 module links the SQLite library of the build (python.org installers, distro packages and uv-managed Pythons ship different versions).
  • Node.js: node:sqlite (Node 22.5+) bundles its own copy; better-sqlite3 also bundles one.
  • Android, iOS, browsers: each OS release fixes the version; check before relying on newer syntax.

Sources