I've written following two triggers on a MySQL table which will get fire before insert and update operations :
IF (NEW.full_name = '') THEN SET NEW.full_name = NEW.user_name; END IF
Now what I want to do is whenever the if condition gets satisfied then the insert/update operation should get fail.
The statement
THEN SET NEW.full_name = NEW.user_name;
should not get execute.
How should I achieve this? Please someone help me.
Thanks in advance.