SELECT table_name FROM sqlite_master;

And then, in your programming language of choice, execute

SELECT count() FROM <table_name>

For each received table name.

You cannot use a variable instead of a table name in SQL.

-----Ursprüngliche Nachricht-----
Von: Paul Sanderson [mailto:sandersonforens...@gmail.com]
Gesendet: Montag, 17. November 2014 11:55
An: General Discussion of SQLite Database
Betreff: [sqlite] Column name as a variable

Is it possible to get a row count for each of the tables in a database using a 
SQL query.

i.e.

is there a way I could use each row in sqlite_master and use table_name to 
somehow do a select count(*) from sqlite.master.table_name

Thanks


Paul
www.sandersonforensics.com
skype: r3scue193
twitter: @sandersonforens
Tel +44 (0)1326 572786
http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit
-Forensic Toolkit for SQLite
http://sandersonforensics.com/forum/content.php?168-Reconnoitre - VSC 
processing made easy _______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to