Need help with a DELETE Syntax for Mysql
Posted: Wed May 07, 2003 9:28 pm
I am trying to delete records from two different tables at one time.
In event table I have eventid and eventname
in participants table I have eventid and name
participants table associates who will be attending events in table 1. So eventid = eventid for how many people are attending.
What would be the delete syntax for Mysql, if I want to delete from table event eventid=1 and all those associated in the participants table where eventid=1
I know that these work:
DELETE FROM participants WHERE eventid=1
DELETE FROM event WHERE eventid=1
How can i combine the two?
running with MySQL 3.23.47
In event table I have eventid and eventname
in participants table I have eventid and name
participants table associates who will be attending events in table 1. So eventid = eventid for how many people are attending.
What would be the delete syntax for Mysql, if I want to delete from table event eventid=1 and all those associated in the participants table where eventid=1
I know that these work:
DELETE FROM participants WHERE eventid=1
DELETE FROM event WHERE eventid=1
How can i combine the two?
running with MySQL 3.23.47