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
  • 201,996
  • 37
  • 293
  • 362
DolDurma
  • 15,753
  • 51
  • 198
  • 377

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
  • 201,996
  • 37
  • 293
  • 362