title: Delete from one table using join on two tables
body: <p>I have two tables <strong>doctor</strong> with *doc_id* and *doc_name* and <strong>patient</strong> with *p_id* *doc_id* foreign key and *p_name*, and I want to delete all records from patients where it will match the doc_name='pardeep', here is my query</p>
  
  <pre><code>DELETE  FROM `doctor` , `patient`  WHERE
  doctor.doc_id=patient.doc_id and doctor.doc_name='pardeep';
  </code></pre>