SQLite3 Readable Output
To make the SQLite3 console output more readable, execute the following command:
1
(echo ".header ON" && echo ".mode column") > ~/.sqliterc
This will create a file named .sqliterc
in your home directory, configuring it to enable table headers and set the output mode to column
.
Before:
1
2
3
sqlite> SELECT users.first_name, users.last_name FROM users;
John|Doe
Richard|Roe
After:
1
2
3
4
5
sqlite> SELECT users.first_name, users.last_name FROM users;
first_name last_name
---------- ----------
John Doe
Richard Roe