Reputation: 582
I am trying to create a procedure in MYSQL which just selects all the rows from a table.
DELIMITER $$
CREATE PROCEDURE getAll_Temps()
BEGIN
SELECT * from temp1
END $$
But I am getting this error,
ERROR 1064 (42000): 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 1.
Upvotes: 0
Views: 67
Reputation: 1937
Try below query.You miss the ;
at the end of the query.
DELIMITER $$
CREATE PROCEDURE getAll_Temps()
BEGIN
SELECT * from temp1;
END $$
Hope this helpful to you.
Upvotes: 2