title: SQL delete from related tables
body: <p>I am trying to delete all records that match a quiz id from the question table and the relationship table.  The query works for a select statement, but won't allow the same statement to delete.  </p>
  
  <p><code>@quizId</code> is a quiz Id value I pass into my stored procedure.  Does anyone know how to delete from both tables using one statement?  Is it possible?  </p>
  
  <pre><code>DELETE tGeoQuestions as a, tGeoQuizToQuestion as b WHERE b.quizId = @quizId AND a.id = b.questionid
  </code></pre>