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
 SQL Server Development (2000)
 QUICKEST JOIN

Author  Topic 

vladimir_grigoro
Yak Posting Veteran

62 Posts

Posted - 2003-04-14 : 08:39:31
Hi All,

I want to find the quickest way to find from Table A, which records are not present in Table B. As both tables have the same primary keys.

Please, give me an advice.

Thank you in advance.

The Rebel

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2003-04-14 : 08:46:21
Hows This

SELECT dbo.TableA.*, dbo.TableB.ID
FROM dbo.TableA LEFT OUTER JOIN
dbo.TableA ON dbo.TableA.ID = dbo.TableB.ID
WHERE (dbo.TableB.ID IS NULL)

Jim

ID = Your Primary Key

Edited by - JimL on 04/14/2003 08:48:41
Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-04-14 : 09:11:34
Read more here.


Jay White
{0}
Go to Top of Page
   

- Advertisement -