I am using this to prevent any delete from MySQL table user
delimiter //
CREATE TRIGGER tr_no_del BEFORE DELETE on user
FOR EACH ROW SET
BEGIN
UPDATE user SET a=0;
END;//
delimiter ;
But mysql is giving some syntax error, any ideas what i am missing here?
Thanks!
FOR EACH ROW SETshould beFOR EACH ROWinstead, as mentioned by @catalinetu. But you should ever include the error message you get, so we know with what problem we're confronted.