SQLite

Common SQLite Commands

sqlite3 -header -csv your_database_name "select * from books;" > books.csv

Source