我試圖通過查詢來創建MySQL觸發器:爲什麼我得到錯誤觸發器?
CREATE TRIGGER `Delete Video` AFTER DELETE ON video
FOR EACH ROW
BEGIN
DELETE FROM usersalbumsvideo where id_video = OLD.idVideo;
DELETE FROM categorytovideo where idVideo = OLD.idVideo;
END
,但我得到的錯誤:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
也試過換id_video = OLD.idVideo
,安達的一個DELETE
錯誤信息幾乎說明你爲什麼得到錯誤... – t3chb0t 2014-12-13 15:24:38