Sqlite3 readable output
To make the sqlite3 console output more readable run:
$ (echo ".header ON" && echo ".mode column") > ~/.sqliterc
This will create a file named .sqliterc
on your home directory with a minimal configuration enabling table headers and setting output mode to column
.
Before:
sqlite> SELECT users.first_name, users.last_name FROM users;
John|Doe
Giovanni|Cappellotto
After:
sqlite> SELECT users.first_name, users.last_name FROM users;
first_name last_name
---------- ----------
John Doe
Giovanni Cappellott
Written by Giovanni Cappellotto
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#