Home » SQL & PL/SQL » SQL & PL/SQL » hwo to count no of rows from two tables
hwo to count no of rows from two tables [message #8646] Wed, 17 September 2003 00:45 Go to next message
NS Jagan
Messages: 6
Registered: September 2003
Junior Member
table 1 has 5 rows
table 2 has 10 rows

how to count no of rows
Re: hwo to count no of rows from two tables [message #8648 is a reply to message #8646] Wed, 17 September 2003 02:02 Go to previous message
Rajarshi Dasgupta
Messages: 52
Registered: October 2001
Member
Simplest method to do this using a single SQL is as follows....

select sum(CNT) from (
select count(*) CNT from table1
union
select count(*) CNT from table1)

There can be other methods also.
Previous Topic: How can i capture all sql statement at one moment?
Next Topic: ' or " or ''' or ''''' ?? who creates this joke ?!
Goto Forum:
  


Current Time: Fri Apr 26 07:40:19 CDT 2024