Asked 7 years ago
9 Feb 2017
Views 1197
jaydeep

jaydeep posted

how to get table list in SQLite database

how to fetch table list in SQLite database
Rasi

Rasi
answered Nov 30 '-1 00:00

following query will result you the tables

SELECT name FROM sqlite_master 
WHERE type IN ('table','view') AND name NOT LIKE 'sqlite_%'
ORDER BY 1


or


.tables

command also give the list of tables
Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

SQLite have sqlite_master table , which contain all meta data about tables.

sqlite_master have following field ::

rowid :: primary key , integer , Auto Increment
type :: table
name :: alias of table name
tbl_name :: table name
rootpage :: root page
sql :: sql query for create table .




SQLite Query


select tbl_name from sqlite_master 


it will give table name list of particular database
is possible to create new column in this sqlite_master , to creating more room for new entry of metadata - denyy  
Feb 10 '17 05:14
no you cant create new column in metadata for SQLite or any database. its like system data - Mitul Dabhi  
Feb 10 '17 05:19
Post Answer