开发者

Can you read pragma statements on command line startup in SQLite

开发者 https://www.devze.com 2022-12-30 23:46 出处:网络
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)

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

精彩评论

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

关注公众号