delete records in 1 table listed in another?

G

Geoff Cox

Hello,

say I have

table1 A B C D etc

table2 B C etc

and I wish to remove B and C and others like this from table1.

How do I do this?!

Thanks

Geoff
 
A

Allen Browne

DELETE FROM Table1
WHERE EXISTS
(SELECT Table2.Field1 FROM Table2
WHERE Table1.Field1 = Table2.Field1);
 
G

Geoff Cox

DELETE FROM Table1
WHERE EXISTS
(SELECT Table2.Field1 FROM Table2
WHERE Table1.Field1 = Table2.Field1);

Thanks Allen. have just noticed that Access 2003 has a "find
unmatched" query type which also does the job!

Cheers

Geoff
 
Top