DELIMITER $$
DROP TRIGGER IF EXISTS test.desktop_test_AFTER_INSERT$$
USE `test`$$
CREATE DEFINER = CURRENT_USER TRIGGER `test`.`desktop_test_AFTER_INSERT` AFTER INSERT ON `desktop_test` FOR EACH ROW
begin
set @tv=1000
set @newdate=new.cdate
set @newh=new.h
insert into check_log_test select cdate,h,(case when pv_pc<=@tv then 1 else 0 end),pv_pc from desktop_test where cdate=@newdate and h=@newh
end
DELIMITER
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)