mentby.com
Blog | Jobs | Help | Signup | Login

command line to get number of tables in sqlite



Hello,

I have a sqlite file. I would like to open it and know how many tables in it.

What is the command line to open a sqlite file and get to know how many tables in it? Thanks.

Regards,
Joe


smallboatca Wed, 21 Dec 2011 10:33:01 -0800

See:

http://www.sqlite.org/sqlite.html

and:

http://www.sqlite.org/faq.html#q7

--
Cheers  --  Tim


Tim Streater Wed, 21 Dec 2011 11:03:56 -0800

Somthing like
sqlite3  sqlite.file
sqlite> select count(*) from sqlite_master where type = 'table';

/Roger

sqlite-users mailing list
sqlite-users*******:8080/cgi-bin/mailman/listinfo/sqlite-users


Roger Andersson Wed, 21 Dec 2011 11:04:23 -0800

select count() from sqlite_master;

No??


Matt Young Wed, 21 Dec 2011 15:25:33 -0800

...where type='table';

Cheers,
Mohit.
22/12/2011 | 12:51 PM.


Mohit Sindhwani Wed, 21 Dec 2011 20:51:19 -0800



Related Topics

Post a Comment