Answer the question
In order to leave comments, you need to log in
What's wrong with my trigger?
mariadb.
I'm trying to create a simple trigger:
create trigger replace_data
before insert on logs
for each row
begin
SET NEW.msg = replace(NEW.msg,'xxx','yyy');
end;
Answer the question
In order to leave comments, you need to log in
24.1 Defining Stored Programs
If you use the mysql client program to define a stored program containing semicolon characters, a problem arises. By default, mysql itself recognizes the semicolon as a statement delimiter, so you must redefine the delimiter temporarily to cause mysql to pass the entire stored program definition to the server.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question