In MySQL we are able to insert multiple rows with the code
INSERT INTO tbl_name
(a,b,c)
VALUES
(1,2,3),
(4,5,6),
(7,8,9);
Is there any way to insert multiple rows in a single MySQL Stored procedure.
Create Stored Procedure:
CREATE PROCEDURE insertTbl_name(IN a_val int(10),IN b_val int(10),IN c_val int(10))
BEGIN
INSERT INTO tbl_name
(a,b,c) VALUES (a_val ,b_val ,c_val);
END
Call Stored Procedure:
CALL insertTbl_name(1,2,3)