SQLite PRAGMA
PRAGMA 读写 SQLite 的内部设置:journal_mode、foreign_keys、cache_size 等运行参数。
Key PointsSQLite,PRAGMA,journal_mode,foreign_keys,配置
讲解
PRAGMA 读写 SQLite 的内部设置:journal_mode、foreign_keys、cache_size 等运行参数。
示例
Shell
PRAGMA foreign_keys = ON; -- 开启外键检查
PRAGMA journal_mode = WAL; -- 提升并发读写
PRAGMA table_info(company); -- 查看表结构Output
foreign_keys
1
journal_mode
wal讲解
PRAGMA 读写 SQLite 的内部设置:journal_mode、foreign_keys、cache_size 等运行参数。
示例
Shell
PRAGMA foreign_keys = ON; -- 开启外键检查
PRAGMA journal_mode = WAL; -- 提升并发读写
PRAGMA table_info(company); -- 查看表结构Output
foreign_keys
1
journal_mode
wal