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
.
精彩评论