Link to home
Start Free TrialLog in
Avatar of Daniel Wilson
Daniel WilsonFlag for United States of America

asked on

MySQL DECLARE Syntax Error

Where's my DECLARE going wrong?
http://dev.mysql.com/doc/refman/5.0/en/declare.html

After a Delimiter $$

mysql> BEGIN Declare i INT; set i =  0; END$$
ERROR 1064 (42000): 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 i INT; set i =  0; END' at line 1
ASKER CERTIFIED SOLUTION
Avatar of TRW-Consulting
TRW-Consulting
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Daniel Wilson

ASKER

Ahh!  I thought I could any time wihin a BEGIN ... END.

Thanks. I'll try a procedure ...
That did it.  Thanks!