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
 Transact-SQL (2000)
 Row count from multiple tables

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-07-24 : 08:50:34
Nilesh writes "Hi,

I want to compare row count of tables of two different database
is there any query for that."

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-07-24 : 09:15:24
use the three part name...

<databasename>.<owner>.<object>


select
(select count(*) from pubs.dbo.authors) as aucount,
(select count(*) from northwind.dbo.Customers) as cucount

 


<O>
Go to Top of Page
   

- Advertisement -