Navicat执行查询:
DELIMITER //
CREATE TRIGGER collect_device_id BEFORE INSERT ON user FOR EACH ROW
BEGIN
SET NEW.log = UPPER(NEW.log);
END; //
命令行执行:
DELIMITER //
CREATE TRIGGER collect_device_id BEFORE INSERT ON user FOR EACH ROW
BEGIN
SET NEW.log = UPPER(NEW.log);
END; //DELIMITER
查看TRIGGER:
SHOW TRIGGERS;
删除TRIGGER:
DROP TRIGGER trigger_name;
DELIMITER 定界符中的为一条语句
现在都不用这个鬼东西,尽量把这些逻辑放在代码里。