-
Notifications
You must be signed in to change notification settings - Fork 0
SQLite Commands and Tips
Christopher Hopkins edited this page Jan 13, 2014
·
5 revisions
SQLite is a lightweight, portable database which can be very useful in development environments. Here are some tips on some common commands.
$ sqlite3 database_file.db
If the file does not exist, then sqlite will create it, otherwise, it will open it.
$ sqlite3 database_file.db "select * from table"
If you want to make the response easier to read then, add the '-csv' '-header' options. For example:
$ sqlite3 -csv -header database_file.db "select * from table"
To create a csv file, use the above example and redirect the output to a file.