Possible Duplicate:
MySQL Trigger to prevent INSERT under certain conditions
In MySQL BEFORE INSERT TRIGGER
how can I skip data insertion under condition?
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 ;