Subject Re: [firebird-support] Count records in tables
Author Woody (TMW)
>
> > > Is there a way to return a count of the records in each table in a
> > firebird
> > > database?
> >
> > SELECT COUNT(*)
> > FROM yourtablename
> >
> >
> > Loop this for each table.
> >
>
> This is the real question....the first bit I knew..
>
> how do you loop this for each table to return a single result set of..
>
> TableName, Count Of Records....

Loop through the RDB$_RELATIONS table and for each RDB$RELATION_NAME that
has zero for the RDB$SYSTEM_FLAG field, do a count on that table. You will
probably have to do this on the client side since you can't use variables
for table and field names in a query in stored procedures.

HTH

Woody (TMW)