A stored routine is either a procedure or a function. Stored routines are created with the CREATE PROCEDURE and CREATE FUNCTION statements  DELIMITER //
CREATE PROCEDURE GetAllProducts()
BEGIN
SELECT *  FROM products;
END //
DELIMITER ;