Using an SQL join in a SQL delete statement

I found this post by Ben Nadel when I was looking for a way to delete the rows in a table based on a foreign key column. I needed this to clear answers provided by a particular user in an online quiz I was developing. It was a real timesaver – the other options were to delete entries manually (ugh!) or write some long ugly code with nested select statements.

Leave a comment