Below is the code I have used for creating a MySQL procedure:
DELIMITER //
CREATE PROCEDURE GetAllComments()
BEGIN
SELECT * FROM comment;
END //
DELIMITER ;
This procedure has been executed correctly, except when I'm trying to call procedure (CALL GetAllComments()
) it is giving me the error below:
Error - #1312 - PROCEDURE test.getAllComments can't return a result set in the given context
What could be the issue?