Bradley Kirton's Blog

Published on Sept. 28, 2024

Go home

Useful sqlite commands

.mode box
sqlite> .tables
auth_group                   db_foodnutrientfts_segments
auth_group_permissions       db_foodnutrientstaging     
auth_permission              db_product                 
db_certification             db_user                    
db_company                   db_user_group
sqlite> .tables auth_group
auth_group
sqlite> .indexes auth_group
sqlite> pragma table_info(auth_group);
┌─────┬──────┬──────────────┬─────────┬────────────┬────┐
│ cid │ name │     type     │ notnull │ dflt_value │ pk │
├─────┼──────┼──────────────┼─────────┼────────────┼────┤
│ 0   │ id   │ INTEGER      │ 1       │            │ 1  │
│ 1   │ name │ varchar(150) │ 1       │            │ 0  │
└─────┴──────┴──────────────┴─────────┴────────────┴────┘