开发者

Can you read pragma statements on command line startup in SQLite

I use the command line sqlite3 executable to check queries I make from my code.

Is there a way to read in pragma statements or other session setup开发者_StackOverflow社区 (".mode csv" for example) when the executable starts up?

I know I can do a ".read " once I'm in, but that's tedious.


Put a .sqliterc file in your home directory with the commands you want executed each time you start the sqlite3 command line tool.

Unix and Linux use ~/.sqliterc; Windows tries to find the location of .sqliterc using the environment variables USERPROFILE HOME HOMEDRIVE and HOMEPATH.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜