Subject RE: [firebird-support] table & table's record
Author Louis Werth
This stored Procedure will do it for you :


Create this procedure :


CREATE PROCEDURE RECORD_COUNTS_FOR_TABLES
RETURNS (
O_TABLE_NAME VARCHAR (80),
O_COUNT INTEGER)
AS
BEGIN
/* Procedure body */
for select rdb$relation_name
from rdb$relations
where rdb$relation_name not starting with 'RDB$'
and rdb$view_source is null
into :O_TABLE_NAME
do begin
execute statement 'select count(*) from '||:O_TABLE_NAME into :O_COUNT;
suspend;
end
END


In SQL Editor run the following SQL :

Select * from RECORD_COUNTS_FOR_TABLES


Regards
Louis



-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of jameschua1021
Sent: 07 June 2005 03:38 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] table & table's record

Is there a fast way so that i could see a list of all my tables and
it's number of records.

Apinot





++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Yahoo! Groups Links