• + 0 comments

    DELIMITER // CREATE PROCEDURE pattern() BEGIN DECLARE count INT; set count = 20;

    WHILE count > 0 DO
        SELECT repeat('* ', count) AS Message;
        SET count = count - 1;
    END WHILE;
    

    END // DELIMITER ;

    CALL pattern();