Suppose Table1 has records that are not in Table2. Also suppose that Table1 and Table2 have a column named "IndexColumn" which can be used for an outer join.
We want an outer join because we want to delete the records in Table1 that are not in Table2. In MS-SQL we have:
DELETE Table1.*
FROM Table1 LEFT JOIN Table2
ON Table1.IndexColumn = Table2.IndexColumn
WHERE ((Table2.IndexColumn Is Null));
Do not do this in t-SQL. Use the following instead:
DELETE Table1
WHERE IndexColumn
NOT IN (SELECT IndexColumn FROM Table2)