MySQL-Trigger Creation -


am trying create 1 update trigger.here code..

delimiter $$ create trigger before_user_update   before update on user     each row  begin insert user_index     set action = 'update',     firstname = old.firstname,     email = old.email,     changedat = now() end  $$ delimiter ; 

for code got error this..

error code: 1064. have error in sql syntax; check manual corresponds mysql server version right syntax use near 'end' @ line 10

how can solve this.. please me..


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -