Subject RE: [firebird-support] Count over multiple tables
Author Kadri Izer
this is (can be) the solution ...
select first 1
((SELECT COUNT(*) FROM TBL1 ) + (SELECT COUNT(*) FROM TBL2))
from tbl2 // (or tbl1)

kadri.

-----Original Message-----
From: williamvdw2004 [mailto:williamvdw2004@...]
Sent: Wednesday, December 01, 2004 10:15 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Count over multiple tables




I would like to get the total number of records for 2 tables combined.

This is as far as I got:

SELECT COUNT(*) FROM TBL1 UNION SELECT COUNT(*)
FROM TBL2;

This gives me 2 rows one with the number of records in TBL1 and one
with the number of records in TBL2. How can I add these values?

Regards
William







Yahoo! Groups Links