嗨我有mysql触发器的问题这是我的代码,出现的错误是这样的: Error1064:插入附近的MYSQL sintax中有错误...
CREATE TRIGGER TRIGGER_HISTORIALES AFTER UPDATE ON BOARD
FOR EACH ROW BEGIN
IF (OLD.IMEI != NEW.IMEI)
INSERT INTO HISTORIAL_CAMBIO_IMEI (HISTORIAL_CAMBIO_ID,FECHA,BOARD_ID,IMEI_ANTERIOR,IMEI_NUEVO)
VALUES
(NULL,SYSDATE(),SELECT BOARD_ID FROM BOARD WHERE IMEI=OLD.IMEI,SYSDATE(),OLD.IMEI,NEW.IMEI);
END IF
END