JSON Functions (SQLite)
JSON Functions (SQLite) is a SQL function in the SQLite Specific category. SQLite 3.9+: built-in JSON functions without extensions. json_extract, json_set, json_each, etc. The syntax is SELECT json_extract(data, '$.key') FROM table;. It accepts see syntax. It returns jSON query result. A typical example: CREATE TABLE items (data TEXT); INSERT INTO items VALUES ('{"name": "Widget", "price": 9.99}'); SELECT json_extract(data, '$.name') FROM items; -- 'Widget' SELECT json_extract(data, '$.name'), json_extract(data, '$.price') FROM items WHERE json_extract(data, '$.price') > 5; -- json_each for expansion: SELECT * FROM items, json_each(data); A close relative is AUTOINCREMENT (SQLite), which sQLite: unlike AUTO_INCREMENT in MySQL, only INTEGER PRIMARY KEY columns auto-increment. AUTOINCREMENT guarantees unique increasing IDs. A close relative is ROWID / _ROWID_, which sQLite: every row has an implicit 64-bit ROWID. INTEGER PRIMARY KEY becomes an alias for ROWID. A close relative is ATTACH DATABASE, which sQLite: connects another database file to the current connection, allowing cross-database queries.