mysql触发器:插入数据前更新创建时间为服务器的时间

DROP TRIGGER IF EXISTS `upd_patientquestionnaire`;
create trigger upd_patientquestionnaire
BEFORE insert on patientquestionnaire for each row
begin
  set new.CreateTime = now();
end;

原文地址:https://www.cnblogs.com/xtjatswc/p/10299604.html