8 lines
193 B
MySQL
8 lines
193 B
MySQL
|
-- Automatically delete all associated scores
|
||
|
-- every time a play is deleted.
|
||
|
CREATE TRIGGER auto_delete_scores AFTER DELETE ON plays
|
||
|
BEGIN
|
||
|
DELETE FROM scores
|
||
|
WHERE play_id = OLD.id;
|
||
|
END;
|