Subject | Re: [firebird-support] Re: count records of all tables |
---|---|
Author | Daniel Albuschat |
Post date | 2009-12-07T12:49:07Z |
2009/12/5 Dimitry Sibiryakov <sd@...>:
set term ^;
execute block returns (table_name varchar(32), record_count integer) as
begin
for select rdb$relation_name from rdb$relations into :table_name do
begin
execute statement "select count(*) from " || :table_name into
:record_count;
suspend;
end
end^
Note: Only valid for Firebird 2.x.
Regards,
Daniel Albuschat
--
eat(this); // delicious suicide
>> if you have an idea how this statement will look please write it?Like this:
>
> You must compose EXECUTE BLOCK with EXECUTE STATEMENT inside.
set term ^;
execute block returns (table_name varchar(32), record_count integer) as
begin
for select rdb$relation_name from rdb$relations into :table_name do
begin
execute statement "select count(*) from " || :table_name into
:record_count;
suspend;
end
end^
Note: Only valid for Firebird 2.x.
Regards,
Daniel Albuschat
--
eat(this); // delicious suicide