aliases | category | classification | date | date_modified | draft | id | image | links | local_archive_links | pinned | series | tags | title | type | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
sqlite |
public |
2021-02-09 04:33:11 -0800 |
2021-02-09 04:33:11 -0800 |
false |
20210209123311 |
false |
false |
|
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');