database - getting error in mysql— #1064 error while creating trigger -
i need create trigger table called try.. execute after entered table..(i using phpmyadmin mysql) getting #1064
error while creating it.. trigger contains
begin declare aa decimal(4,3); declare bb decimal(4,3); declare cc decimal(4,3); declare cur1 cursor select a,b,c site; open cur1; fetch next cur1 aa,bb,cc; while fetch_status=0 print aa; end while; end
it shows error this
mysql said: #1064 - have error in sql syntax; check manual corresponds mysql server version right syntax use near 'aa; end while; end' @ line 9
i newbie trigger..help me... thanks
try changing while loop
while fetch_status=0 //print here end while;
as specified in link
http://dev.mysql.com/doc/refman/5.7/en/while.html
in addition see post mysql print functionality
Comments
Post a Comment