Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL Sever

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-05-07 : 11:30:06
Nitin writes "how to find total number of records in 2 tables with a single sql statement ."

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-05-07 : 11:32:03
select (select count(*) from table1)+(select count(*) from table2)

Jay White
{0}
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2004-05-07 : 11:32:33
select (select count(*) from t1) + (select count(*) from t2)


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -