Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 767 Bytes

sqlite3-cheatsheet.md

File metadata and controls

38 lines (32 loc) · 767 Bytes
aliases category classification date date_modified draft id image links local_archive_links pinned print series tags title type
sqlite3-cheatsheet
sqlite
public
2021-02-09 04:33:11 -0800
2021-02-09 04:33:11 -0800
false
20210209123311
false
false
cheatsheet
sql
sqlite
database
SQLite3 Cheat Sheet
tech-note
# Run script on database:
sqlite3 example.db
sqlite> .read create.sql

# Run script on database:
sqlite3 example.db < create.sql

# Run query on database:
sqlite3 example.db 'CREATE TABLE entries(id TEXT, title TEXT, date TEXT, tags TEXT, content TEXT);'

# Delete row where column equals:
sqlite3 wiki.db "DELETE FROM entries WHERE id=20210209145248;"

# Delete row:
DELETE FROM "main"."entries" WHERE _rowid_ IN ('918');