触发器及数据迁移
编写触发器需要设置数据库用户权限:SET GLOBAL log_bin_trust_function_creators = 1;
编写触发器
【新增触发器】
BEGIN
INSERT INTO kjj_user_c (
`id`, `name`, `no`, `companyid`, `tel`, `xueli`, `xuewei`, `email`, `address`, `create_date`, `state`, `type`, `sex`, `del_flag`, `i_state`, `i_flag`, `i_time`
)
VALUES (
NEW.`id`, NEW.`name`, NEW.`no`, NEW.`companyid`, NEW.`tel`, NEW.`xueli`, NEW.`xuewei`, NEW.`email`, NEW.`address`, NEW.`create_date`, NEW.`state`, NEW.`type`, NEW.`sex`, NEW.`del_flag`, '1', 'I', NOW()
);
END


