Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

subract count(*) from count(*) 1

Status
Not open for further replies.

pandatime

Programmer
Joined
Jan 29, 2010
Messages
92
Location
AU
Hi,

is there a way to do this?

select count(*) from tab1
-
select count(*) from tab2

?

Thanks
 
This should do the trick:

Code:
select (select count(*) from tab1)
-
(select count(*) from tab2) as [yourAnswer]

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top