当我尝试执行此查询以使用Mysql
创建TRIGGER时CREATE TRIGGER `befor_insert_VIN` BEFORE INSERT ON `vin_table`
FOR EACH ROW
BEGIN
IF( SELECT COUNT(*) FROM `vin_table` WHERE `MODEL_CODE`= NEW.MODEL_CODE AND
`LOT`= NEW.LOT AND `VIN`= NEW.VIN >0 ) THEN BEGIN
DELETE FROM `vin_table` WHERE `LOT`= NEW.`LOT`;
END ;
END IF;
END ;
我收到了这个回复
MySQLarépondu:
1064 - Erreur desyntaxeprèsde''la la ligne 5