gpt4 book ai didi

MySQL `BEFORE INSERT TRIGGER` 条件下如何跳过数据插入?

转载 作者:可可西里 更新时间:2023-11-01 08:06:34 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
MySQL Trigger to prevent INSERT under certain conditions

在 MySQL BEFORE INSERT TRIGGER 中,如何跳过条件下的数据插入?

delimiter //
drop trigger if exists test_trigger //
create trigger test_trigger before insert on t
for each row
begin
set @found := false;

#Some code

if @found then
#How to skip the data insertion under condition?
end if;
end //

delimiter ;

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