您好我想创建一个触发器(它是 MYSQL )
我先得到的,哪些不正常,继续将project_id设为0并哈希值并插入 project_id_md5 。
CREATE TRIGGER project_auto_md5 BEFORE INSERT ON project
FOR EACH ROW SET NEW.project_id_md5 = md5(NEW.project_id);
然后我改为之后,这次 project_id_md5 字段变空。
CREATE TRIGGER project_auto_md5 AFETER INSERT ON project
FOR EACH ROW UPDATE project SET project_id_md5 = md5(project_id);
请大家帮忙解决问题。