Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Question... I hope 2

Status
Not open for further replies.

Newbi1

Programmer
Apr 4, 2005
64
US
I have 2 tables Tbl1, tbl2 and both tables have a record in it: rec1.

What I need is a statement that will allow me to get all the records in tbl1 where they are not = to the record in tbl2.
 
Use a Join or:

Select ID From Tbl1 Where ID Not In (Select ID From Tbl2)
 
the join method
Code:
select t1.rec1
From table1 t1 left join table2 t2 on t1.recid = t2.recid
where t2.recid is null

"...we both know I'm training to become a cagefighter...see what happens if you try 'n hit me..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top