Subject | Re: [firebird-support] Row count for all tables |
---|---|
Author | Alexandre Benson Smith |
Post date | 2011-03-29T15:56:58Z |
Em 29/3/2011 11:39, Scott escreveu:
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 ; ^
> Hello,try this:
>
> Is there a easy way to get the row count for all tables?
>
>
> Dave
>
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 ; ^