I'm trying to create a simple stored procedure like this:
CREATE DEFINER = 'root'@'localhost'
PROCEDURE testProcedure()
BEGIN
DECLARE variableAaa INT;
DECLARE variableBbb INT;
END
but I get this error from MySql:
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' at line 1
If I change the variable names:
DECLARE variableA INT;
DECLARE variableB INT;
I get 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 'DECLARE variableB INT' at line 1
and so on:
DECLARE variableName INT;
DECLARE variableEmail INT;
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 variableEmail INT' at line 1
I'm using MySql 5.5.34 with PhpMyAdmin, but it's the same with Sequel Pro.
Where am I wrong?