Home Forums SQL Server 7,2000 SQL Server Newbies Same tables different counts RE: Same tables different counts
Lynn Pettis
SSC Guru
Points: 442467
More actions
August 3, 2009 at 11:10 am
#1033799
How many rows are returned with the following query?
select
mt1.*
from
DBO.MyTable01 mt1
where
mt1.Type IN (10,810)
and exists (select 1 from dbo.MyTable2 mt2 where mt1.AcctNo = mt2.AcctNo and mt1.Mdate = mt2.Mdate)
Edit: Modified code slightly.