[1054] Unknown column ‘xxxxx‘ in ‘where clause‘
DROP TRIGGER IF EXISTS `delete_actdata`; CREATE DEFINER=`xxxxxx`@`localhost` TRIGGER `delete_actdata` BEFORE DELETE ON `actdata` FOR EACH ROW BEGIN DELETE FROM `great` WHERE `great`.`actid`=`actid`; DELETE FROM `join` WHERE `join`.`actid`=`actid`; DELETE FROM `get` WHERE `get`.`actid`=`actid`; DELETE FROM `signup` WHERE `signup`.`actid`=`actid`; DELETE FROM `vote_option` WHERE `vote_option`.`actid`=`actid`; DELETE FROM `vote_users` WHERE `vote_users`.`actid`=`actid`; END;
删除的每个表中的字段名称要与触发器所在表的字段名一致
原文地址:http://blog.csdn.net/vichild/article/details/45695773