【发布时间】:2012-11-22 10:50:10
【问题描述】:
可能重复:
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 ;
【问题讨论】: