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)
 SQL Query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-11-17 : 07:14:27
Anurag writes "Hi,

I have a requirement where I need to get all the rows from Table 1 except those which are present in Table 2. I am using SQL Server 2000.

Please advise how to do this...

Anurag"

nr
SQLTeam MVY

12543 Posts

Posted - 2004-11-17 : 07:22:18
select t1.*
from t1
left join t2
on t1.pk = t2.pk
where t2.pk is null

==========================================
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 -