SQLite PRAGMA foreign_keys
SQLite PRAGMA foreign_keys is a SQL statement in the SQLite Specific category. SQLite: foreign key enforcement is OFF by default. Must be enabled for each connection to enforce referential integrity. The syntax is PRAGMA foreign_keys = ON;. It returns fK enforcement set. 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. Related SQLite Specific entries: AUTOINCREMENT (SQLite), ROWID / _ROWID_, ATTACH DATABASE, PRAGMA, VACUUM (SQLite), EXPLAIN QUERY PLAN (SQLite), JSON Functions (SQLite), CREATE VIRTUAL TABLE (FTS5).