What is out for

Jul 20 2012 4:21 AM
CREATE TABLE #A(ID INT,NAME VARCHAR(10))
INSERT INTO #A VALUES(1,'ABC')
INSERT INTO #A VALUES(2,'XYZ')

CREATE TABLE #B(ID INT,NAME VARCHAR(10))
INSERT INTO #B VALUES(NULL,'ABC')
INSERT INTO #B VALUES(2,'XYZ')
Select * from #A where ID NOT in (select ID from #B)

Answers (6)