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!
Delete Multiple Rows on a Many-to-Many Relationship Table
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Delete Multiple Rows on a Many-to-Many Relationship Tabl
You mean like this?:
DELETE FROM student_choice WHERE student_id='001'
DELETE FROM student_choice WHERE student_id='001'
(#10850)
Re: Delete Multiple Rows on a Many-to-Many Relationship Tabl
Ouch!!! that's what I mean...
@_@ Thanks @_@
@_@ Thanks @_@