title: deleting records from multiple tables at a time with a single query in sqlserver2005
body: <p>I wanna delete records from child tables as well as parent table with in a single query. please find the query given below. here response header is the primary table and responseid is the primary key.</p>
  
  <pre><code>DELETE FROM responseheader
      FROM responseheader
      INNER JOIN responsepromotion ON responseheader.responseid = responsepromotion.ResponseID
      INNER JOIN responseext ON responsepromotion.ResponseID=responseext.ResponseID 
      WHERE responseheader.responseid In ('67D8B9E8-BAD2-42E6-BAEA-000025D56253')
  </code></pre>
  
  <p>but its throwing error . can any one help me to find out the correct query</p>