I create a stored procedure in Navicat for MySQL as follows:
CREATE PROCEDURE myloop()
BEGIN
DECLARE customerID INT DEFAULT 11;
first_loop: LOOP
SET customerID = customerID +1;
DECLARE itemID INT DEFAULT 0;
second_loop: LOOP
SET itemID = itemID +1;
Insert INTO tbl_order(customerId, itemId) VALUES
(customerID, itemID );
IF itemID=3000 THEN
LEAVE second_loop;
END IF;
END LOOP second_loop;
IF customerID=3000 THEN
LEAVE first_loop;
END IF;
END LOOP first_loop;
END
but I cannot find anywhere to call my stored procedure.
How can I see and call my created stored procedure?
source
share