2

When I open the sqlite3 command line in Windows Command Prompt, I each time type

.mode column
.width 8
.header on

Sometimes I choose a different width, but this is easy to change as needed.

Is there some way I can have these either as defaults, or execute each time the prompt starts?

CL.
  • 173,858
  • 17
  • 217
  • 259
chrisb2244
  • 2,940
  • 22
  • 44
  • 1
    Possible duplicate of [Change SQLite default settings](http://stackoverflow.com/questions/5240643/change-sqlite-default-settings) – Murphy Feb 17 '17 at 13:28

2 Answers2

2

The default rc file for SQLite is ~/.sqliterc; see the man page. You just paste that lines there.

Murphy
  • 3,827
  • 4
  • 21
  • 35
1

Put these commands into a file, and give the file name to sqlite3's -init option.

(The options are not in the documentation; see sqlite3 --help for a list.)

CL.
  • 173,858
  • 17
  • 217
  • 259