MySQL AFTER UPDATE TRIGGER to increase count -


any ideas what's wrong query? searched around stackoverflow , seems using , works.

mysql> create trigger upd_entry      -> after update on entry each row     -> begin     ->     update entry      ->     set count = count +1      ->     id = new.id     -> end; error 1064 (42000): have error in sql syntax; check manual corresponds mysql server version right syntax use near 'end' @ line 7 

run first change delimiter

delimiter // 

create trigger

create trigger upd_entry  after update on entry each row begin    update entry     set count = count +1     id = new.id; end// 

after change back

delimiter ; 

Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -