Friday, September 9, 2016

When deleting against an IN clause in T-SQL, wrap the thing to delete against in parenthesis.

DELETE FROM Foo WHERE (FooId) IN ((SELECT FooId FROM Bar WHERE BarId=13))

No comments:

Post a Comment