PDA

Click to See Complete Forum and Search --> : sql statement


Thai
Mar 23rd, 2000, 11:44 PM
Hello again.

If Table1 and Table2 both have the field called NUMBER, what sql statement would I use to return all fields from Table1, where NUMBER from Table1 DOES NOT exist in NUMBER from Table2? I've been trying a few things but none work, please help if you can.

Thai

JHausmann
Mar 24th, 2000, 12:02 AM
select * from table1 where number not in (select distinct number from table2)

Thai
Mar 24th, 2000, 01:16 AM
Thanks for the help, it works now :)

Thai