Not able to execute SQL Script on MYSQL
Budget: ₹400 – ₹750 INR
Not able to execute Stored Procedure from script
USE wh_news;
CREATE PROCEDURE p (i INT)
BEGIN
DECLARE i INT DEFAULT 0;
SELECT i FROM t;
BEGIN
DECLARE i INT DEFAULT 1;
SELECT i FROM t;
END;
END;
Error:
BEGIN
DECLARE i INT DEFAULT 0 876 [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 '' at line 3
USE wh_news;
CREATE PROCEDURE p (i INT)
BEGIN
DECLARE i INT DEFAULT 0;
SELECT i FROM t;
BEGIN
DECLARE i INT DEFAULT 1;
SELECT i FROM t;
END;
END;
Error:
BEGIN
DECLARE i INT DEFAULT 0 876 [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 '' at line 3