Delete Multiple Rows on a Many-to-Many Relationship Table
Posted: Fri Feb 08, 2013 12:14 pm
Is it possible to Delete Multiple Rows on a Many-to-Many Relationship Table?
eg..
TABLE student_choice (
student_id int(3),
course_taken varchar(16),
PRIMARY KEY(student_id, course_taken)
}
Data:
student_id | course_taken
001 | math
001 | english
002 | math
002 | biology
I want to delete all of "001" record!
Can I do it in one simple delete statement?
Thanks for the help!
eg..
TABLE student_choice (
student_id int(3),
course_taken varchar(16),
PRIMARY KEY(student_id, course_taken)
}
Data:
student_id | course_taken
001 | math
001 | english
002 | math
002 | biology
I want to delete all of "001" record!
Can I do it in one simple delete statement?
Thanks for the help!