Using T-SQL EXCEPT with DELETE / Optimizing a query
问题 The following code removes records of tasks related to inactive projects from the table. delete from [Deliverables] where [Deliverables].[ProjectID] not in ( select [ProjectID] from [ActiveProjects] ) I've read somewhere that using NOT IN with subquery that returns a lot of values is not really the most efficient thing to do and it's better to use EXCEPT clause. However, when I try to use the following code, I get an error (Incorrect syntax near the keyword 'except'.) delete from