SQLite PRAGMA Statement
Overview
The SQLite PRAGMA statement is used to query or modify various aspects of the SQLite database. PRAGMA statements are special commands that provide access to internal database settings and parameters.
SQLite PRAGMA Statement
The general syntax of the PRAGMA statement is as follows:
The syntax to query the information is
PRAGMA pragma_name;
The syntax to set the values is
PRAGMA pragma_name = <value>;
Example
Let’s understand the statement usage with the help of some examples:
sqlite> PRAGMA page_size;
4096
sqlite> — The above is to query the page size information
sqlite>
sqlite> PRAGMA cache_size = 2048;
sqlite> — The above is to set the cache size
sqlite>
sqlite> PRAGMA cache_size;
2048
—
SQLite Tutorials
SQLite tutorials on this website:
https://www.testingdocs.com/sqlite-database-tutorials/
For more information on SQLite, visit the official website: