I am writing a stored procedure using MySql which returns multiple rows using select statement.
My code is as below
drop procedure if exists GetAccounts;
DELIMITER //
CREATE PROCEDURE GetAccounts()
BEGIN
DECLARE rowcount int;
SET @resultset = (SELECT * from requests where STATUS = "FAILURE" ;
END //
DELIMITER
Any examples of how to return a resultSet in storedProcedure?
Thanks Gendaful
DROP PROCEDURE IF EXISTS GetAccounts;
DELIMITER //
CREATE PROCEDURE GetAccounts()
BEGIN
DECLARE rowcount int;
SELECT * from requests where STATUS = "FAILURE" ;
END //
DELIMITER ;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With