I am trying to create a simple stored procedure in MYSQL 5.6.13
create procedure create_logger_id(IN mobile BIGINT)
BEGIN
SELECT COUNT(*) INTO mobile FROM USER_REG_TYPE;
END
But Get this 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 '' at line 3
I even tried delimiter //
, DECLARE mobile INT
and few others all of them lead to the same error.
The MYSQL server is hosted on AWS RDS (Added this info to understand if there is a known issue)
Update: if I try
DELIMITER //;
CREATE PROCEDURE create_logger_id(IN mobile BIGINT)
BEGIN
SELECT COUNT(*) INTO mobile FROM USER_REG_TYPE;
END //
DELIMITER ;
I get the following 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 'DELIMITER //' at line 1