Subject Re: [firebird-support] Row count for all tables
Author Alexandre Benson Smith
Em 29/3/2011 11:39, Scott escreveu:
> Hello,
>
> Is there a easy way to get the row count for all tables?
>
>
> Dave
>

try this:

SET TERM ^ ;
EXECUTE BLOCK
RETURNS (
TableName Varchar(31),
RecordCount Integer )
AS
begin
For
select
RDB$Relation_Name
from
RDB$Relations
where
RDB$System_Flag = 0 and
RDB$View_BLR is null
into
:TableName
do begin
Execute Statement 'Select count(*) from ' || :TableName into
:RecordCount;
Suspend;
end
end^
SET TERM ; ^