MYSQL创建触发器,修改结束符号
DELIMITER $
CREATE TRIGGER `dw_realtime_i_a`
AFTER INSERT ON `dw_realtime` FOR EACH ROW
begin
replace into dw_realtime(id,etl_dt)
select
id
,DATE_FORMAT(NOW(),'%Y-%m-%d') as etl_dt
from dw_kf_fact_work_data
where task_id=new.id
;
end$
DELIMITER $