Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 561 Bytes

sqlite.md

File metadata and controls

35 lines (26 loc) · 561 Bytes

SQLITE

Connect to a database:

sqlite3 file.sqlite

List all tables:

.tables

Schema of a given table:

.schema albums

Use the PRAGMA command to display column informations:

.header on
.column on
pragma table_info('albums');
cid  name      type           notnull  dflt_value  pk
---  --------  -------------  -------  ----------  --
0    AlbumId   INTEGER        1                    1
1    Title     NVARCHAR(160)  1                    0
2    ArtistId  INTEGER        1                    0
``