how to print table names from a sqlite database

to illustrate, we’ll use a test database:

$ sqlite testdb
sqlite> create table t1 (a, b, c);
sqlite> create table t2 (d, e, f);
select tbl_name from sqlite_master where type = 'table';
t1
t2
sqlite> .q

8/8/2011