gpt4 book ai didi

mysql - mysql触发器语句中的别名

转载 作者:行者123 更新时间:2023-11-29 11:36:08 25 4
gpt4 key购买 nike

我尝试使用别名创建触发器,但收到错误:

delimiter |
create trigger death before insert on retiree_hist RH
for each row
begin
delete from myjobdata JD
where JD.emplid = RH.emplid;
end;|
delimiter ;

我了解到别名不能与触发器一起使用。有没有办法解决?

最佳答案

delimiter |
create trigger death before insert on retiree_hist
for each row
begin
delete from myjobdata
where myjobdata.emplid = NEW.emplid;
end
|
delimiter ;

关于mysql - mysql触发器语句中的别名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36560214/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com