MySQL update Trigger to update data table value After Insert on another table -
i have been stumbling on writing mysql trigger , hopping me find elegant solution solve issue. have looked many places , cannot seem find bug in code. tried not adjusting delimiter seems create problems able create trigger without setting delimiter if replace update statement else.
the code have is:
use mytable delimiter // --trigger update scheduling 'status' , 'retries' values create trigger `scheduling-updatde_after_result-insert` after insert on results each row begin update `scheduling` set running = false, retries = retries + 1 id = new.id; end// delimiter ;
i following errors:
18:03:25 [delimiter - 0 row(s), 0.000 secs] [error code: 1064, sql state: 42000] have error in sql syntax; check manual corresponds mysql server version right syntax use near 'delimiter
create trigger acapella
.scheduling-updatde_after_result-insert
' @ line 1
code: 1064 sql state: 42000 --- have error in sql syntax; check manual corresponds mysql server version right syntax use near 'delimiter
create trigger scheduling-updatde_after_result-insert
' @ line 1
18:03:25 [end - 0 row(s), 0.000 secs] [error code: 1064, sql state: 42000] have error in sql syntax; check manual corresponds mysql server version right syntax use near 'end delimiter' @ line 1
code: 1064 sql state: 42000 --- have error in sql syntax; check manual corresponds mysql server version right syntax use near 'end delimiter' @ line 1
Comments
Post a Comment