During my 24 Hours of Pass presentation on Advanced CTE’s today I was asked the question about deleting from a CTE when it uses an EXISTS statement that queries another table. I figured I would create quick blog post to show the example. First some background when using the delete statement with a CTE you can’t delete if the query inside …

Deleting from a CTE with an EXISTS statement Read more »