SQLite

From Dave's wiki
Jump to navigation Jump to search

SQLite is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. The code for SQLite is in the public domain and is thus free for use for any purpose, commercial or private. SQLite is the most widely deployed database in the world with more applications than we can count, including several high-profile projects.[1]

Common tasks

http://stackoverflow.com/questions/82875/how-do-i-list-the-tables-in-a-sqlite-database-file

.tables
.schema tablename

http://stackoverflow.com/questions/6776657/how-to-change-a-value-in-a-column-on-a-sqlite-database

UPDATE users SET role=99 WHERE name='Fred'

To execute a query on the command line:

sqlite3 blah.db "select * from table" > file.out

Downloading

https://www.sqlite.org/download.html

References