Dave wrote:
Is there a easy way to get the row count for all tables?
Alexandre Benson Smith answers:
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 ; ^