I am trying to set trigger to the sql to update value of a gf with a value from field "title" inside table c_p_r, but getting an error in syntax. Can someone point me where I am wrong?
CREATE TRIGGER setgf
AFTER UPDATE ON c_p_r
FOR EACH ROW BEGIN
TRUNCATE gf
UPDATE gf
SET gf = title
FROM c_p_r
This thing is answering me with
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UPDATE gf
SET gf = title
FROM c_p_r' at line 5
Can someone point me where I am wrong with it?