PRAGMA
PRAGMA is a SQL statement in the SQLite Specific category. SQLite: special commands to query/set database configuration, metadata, and behavior. The syntax is PRAGMA pragma_name = value;. It returns pragma result. A typical example: PRAGMA table_info(employees); -- Shows column info: cid, name, type, notnull, dflt_value, pk PRAGMA journal_mode = WAL; -- Switch to Write-Ahead Logging (better concurrency) PRAGMA synchronous = NORMAL; -- Balance safety and speed PRAGMA foreign_keys = ON; -- Enable foreign key enforcement (off by default!) 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. More about this category: SQLite-specific features — AUTOINCREMENT, ATTACH, VACUUM, PRAGMA, ROWID.