On Thu, Mar 26, 2009 at 3:18 PM, REPKA_Maxime_NeufBox
<repka.max...@neuf.fr> wrote:
> Hello,
>
> Exemple of 2 SQL command :
> sqlite> select name from sqlite_master where type='table';
>    City
>    Country
>    CountryLanguage
>    sqlite_stat1
>
> sqlite> select count(*) from country;
>    239
>
> ->> Could anyone tell me what is the command to get the following result :
>    Table names         nb of records per table
>    City                          4520
>    Country                      239
>    CountryLanguage        253
>    sqlite_stat1                325
> Thank you
>
> Sincerely
> Maxime
>


As Igor advised, you can't do this with SQL because there is no column
on which you can join the sqlite_master table and names of the other
tables.

The easiest thing for you to do is to maintain a table that uses
TRIGGERs to update count of rows. Search the mail archives for
numerous posts on how to do this.



-- 
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Carbon Model http://carbonmodel.org/
Open Source Geospatial Foundation http://www.osgeo.org/
Sent from: Ft Myer VA United States.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to