Integer in MySQL procedure, syntax error
- by confiq
I made simple procedure just to demonstrate
CREATE PROCEDURE `demo`(demo_int int)
BEGIN
DECLARE minid INT;
SELECT min(id) FROM (SELECT id FROM events LIMIT demo_int,9999999999999999) as hoo INTO minid;
END$$
The problem is with demo_int, if i change it to
LIMIT 1,9999999999999999
it works but
LIMIT demo_int,9999999999999999
Does not...
It gives error
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 'demo_int,9999999999999999) as hoo INTO minid; END' at line 4 (errno: 1064)
Any clues?