how to print a pattern in mysql

Solutions on MaxInterview for how to print a pattern in mysql by the best coders in the world

showing results for - "how to print a pattern in mysql"
Julián
22 Oct 2020
1DECLARE @var int               -- Declare
2SELECT @var = 5                -- Initialization
3WHILE @var > 0                 -- condition
4BEGIN                          -- Begin
5PRINT replicate('* ', @var)    -- Print
6SET @var = @var - 1            -- decrement
7END                            -- END
8