0

in mysql editor i can not define simple variables with DECLARE such as:

DECLARE v_delay INT DEFAULT 0 ;

i get this error now:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE v_delay INT DEFAULT 0' at line 1

juergen d
  • 195,137
  • 36
  • 275
  • 343
DolDurma
  • 13,596
  • 41
  • 168
  • 323

1 Answers1

0

In MySQL you can only declare in a function, procedure, trigger, event, ....

You need a shell around your code if it is more than a query

juergen d
  • 195,137
  • 36
  • 275
  • 343