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)
 select data only from second table

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-08-11 : 08:56:17
srs writes "how to extract data from second table that is not present in the first table using SQL in sql server?"

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-08-11 : 09:00:53
what r ur "First" & "Second' tables ?
Give an example

Srinika
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-08-11 : 09:43:27
[code]select *
from second s
where not exists (select * from first f where f.pk = s.pk)[/code]


KH

Go to Top of Page
   

- Advertisement -