Can't create base stored process on MariaDB
The documented procedure in the MariaDB page fails for me:
DELIMITER //
CREATE PROCEDURE simpleproc (OUT param1 INT)
BEGIN
SELECT COUNT(*) INTO param1 FROM t;
END;
//
I am getting this error:
The following errors were reported: You have an error in your SQL syntax; check the manual corresponding to your MySQL server version for the correct syntax to use next to "DELIMITER // CREATE PROCEDURE simpleproc (OUT param1 INT) BEGIN SELECT COUNT" on line 1 You have an error in your SQL syntax; check the manual corresponding to your MySQL server version for the correct syntax to use next to "END" on line 1 You have an error in your SQL syntax; check the manual corresponding to your MySQL server version for the correct syntax to use next to "//" on line 1
What am I doing wrong and how do I fix it?
+3
source to share