Rumah > Artikel > pangkalan data > mysql 5.5 触发器的问题_MySQL
1064
正确的写法如下:
DELIMITER $$
CREATE TRIGGER `tkdsp_setspxx` BEFORE DELETE ON `tkdsp` FOR EACH ROW BEGIN
update spxx set kcsl=kcsl-old.sl,kczj=kcsl*jhprice where spid=old.spid;
END$$
DELIMITER ;
记一下