/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
| Feature | Since |
|---|---|
| Window functions (OVER) | 3.25.0 |
| ALTER TABLE … RENAME COLUMN | 3.25.0 |
| UPSERT (INSERT … ON CONFLICT DO UPDATE) | 3.24.0 |
| Generated columns | 3.31.0 |
| iif() | 3.32.0 |
| RETURNING | 3.35.0 |
| ALTER TABLE … DROP COLUMN | 3.35.0 |
| STRICT tables | 3.37.0 |
| -> and ->> JSON operators, unixepoch() | 3.38.0 |
| JSON functions built in by default | 3.38.0 |
| JSONB functions (jsonb_*) | 3.45.0 |
| concat(), concat_ws() | 3.44.0 |
Check what your SQLite supports
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}")
EOFOutput
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.nWhere SQLite versions come from
- Python: the
sqlite3module 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-sqlite3also bundles one. - Android, iOS, browsers: each OS release fixes the version; check before relying on newer syntax.
Sources
Related pages
config · sqliteSQLite PRAGMA journal_mode=WAL: concurrent readers and a writerPRAGMA journal_mode=WAL makes SQLite write changes to a -wal file, so readers keep working while one connection writes. It is stored in the database file.errors · sqliteSQLite: database is locked (SQLITE_BUSY)SQLite returns database is locked (SQLITE_BUSY) when another connection holds a write lock. Fix it with a busy timeout, WAL mode, and short write transactions.compare · sqlSQL INNER JOIN vs LEFT JOIN: which rows each one returnsINNER JOIN returns only rows that match on both sides; LEFT JOIN keeps every left row and fills NULL where nothing matches. Shown with real query output.