Ok, I feel stupid for having to ask this but I can't seem to make it work. I'm following what appears to be a simple example too.
SET @v1 = 5;
WHILE @v1 > 0 DO
SET @v1 = @v1 - 1;
END WHILE;
I'm betting two errors:
1.
Error Code : 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 'WHILE (@v1 > 0) DO
SET @v1 = @v1 - 1' at line 1
2.
Error Code : 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 'END WHILE' at line 1
It seems that what I'm trying to do is very simple. Am I missing something incredibly simple?
SET @v1 = 5;
WHILE @v1 > 0 DO
SET @v1 = @v1 - 1;
END WHILE;
I'm betting two errors:
1.
Error Code : 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 'WHILE (@v1 > 0) DO
SET @v1 = @v1 - 1' at line 1
2.
Error Code : 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 'END WHILE' at line 1
It seems that what I'm trying to do is very simple. Am I missing something incredibly simple?