I have created one stored procedure and its functioning well, what I am wanting is right now there is only one SQL statement in the stored procedure which is returning the expected values, can I add multiple SQL statements which will be resulting multiple vlues. Please let me know.
Here is my stored procedure
DELIMITER //
CREATE PROCEDURE amazonall(IN client_ids INT(11))
BEGIN
SELECT SUM(total_inserted) into ti from log_amazon_import where client_id = client_ids and date_format(created_date,'%Y-%m-%d') between DATE_SUB(CURDATE(),INTERVAL 1 WEEK) and CURDATE();
END //
DELIMITER ;
and also please let me know how can I access those return values, thanks in advance.
Yes, you can. If you want to return multiple records – just return the data set.