This delete query runs forever and I have to kill it.
Table1 has about 5,000 records and Table2 has about 300,000 records.
If I first create Table3 of distinct Field1's and then do:
it runs quickly. But I would rather not create the Table 3.
Thanks for any help.
Code:
DELETE * FROM Table1
WHERE Table 1.Field1 NOT IN (SELECT DISTINCT Field1 FROM Table 2 where Field1 is not null);
If I first create Table3 of distinct Field1's and then do:
Code:
DELETE * FROM Table1
WHERE Field1 not in (Select Field1 From Table3);
Thanks for any help.