Turn on FK checks for the current connection.
Section: Integrity and connection behavior
Enable foreign key enforcement
sql
sql
PRAGMA foreign_keys = ON;Explanation
Foreign key enforcement is connection-specific and should usually be enabled explicitly by applications.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Integrity and connection behavior