Delete from one table using join on two tables
I have two tables doctor with *doc_id* and *doc_name* and patient 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
DELETE FROM doctor , patient WHERE doctor.doc_id=patient.doc_id and
doctor.doc_name='pardeep';
No comments:
Post a Comment