Anda tidak menentukan RDBMS Anda, jadi ini dia di MySQL
DELETE teammembers FROM teammembers
JOIN teams on teammembers.teamId = teams.teamId
WHERE teams.eventId = 1
Anda tidak menentukan RDBMS Anda, jadi ini dia di MySQL
DELETE teammembers FROM teammembers
JOIN teams on teammembers.teamId = teams.teamId
WHERE teams.eventId = 1