MySQL Forums
Forum List  »  Triggers

I need help with if statement in my trigger statement
Posted by: Eric Ma
Date: June 27, 2022 02:56PM

create trigger idcheck after insert on customers
for each row
if (select exists(select * from customers where `Last Name`="Ma"))
then
rollback;
end if;

this is my query. can you tell me what I'm doing wrong with my if statement?

Options: ReplyQuote


Subject
Views
Written By
Posted
I need help with if statement in my trigger statement
575
June 27, 2022 02:56PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.