Database / SQLite Interview questions
What is the PRAGMA statement used for?
PRAGMA is SQLite's mechanism for querying or modifying internal engine settings and behavior
— configuration knobs that aren't part of standard SQL but control how SQLite itself operates for the
current connection or database.
PRAGMA foreign_keys = ON; -- enable foreign key enforcement PRAGMA journal_mode = WAL; -- switch to write-ahead logging mode PRAGMA table_info(person); -- inspect a table's column definitions PRAGMA integrity_check; -- verify database file consistency
Some pragmas are per-connection settings that reset each time you reconnect (like
foreign_keys), while others persist as part of the database file itself (like
journal_mode = WAL). Because there's no separate configuration file or server settings panel the
way client-server databases have, pragmas are how essentially all of SQLite's tunable behavior is accessed.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
