We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Draw The Triangle 2
Draw The Triangle 2
Sort by
recency
|
878 Discussions
|
Please Login in order to post a comment
/MySQL/
DELIMITER // CREATE PROCEDURE PrintPattern(IN R INT) BEGIN declare val INT default 1; while val <= R DO select repeat('* ', val); set val = val + 1; END WHILE; END // DELIMITER ;
call PrintPattern(20);
declare @pointer int = 20, @counter int = 1
while (@counter <= @pointer) begin select(replicate('* ', @counter)) set @counter = @counter+1 end
set @row := 0; select repeat('* ', @row := @row + 1) from information_schema.tables where @row < 20
MySQL Query