DECLARE @var int
SELECT @var = 5
WHILE @var >0
BEGIN
PRINT replicate('* ', @var)
SET @var = @var - 1
END
** In simlar way you can print different patterns **
or you can query the atterns in the below way also
SET @number = 0;
SELECT REPEAT('* ', @number := @number+1) FROM information_schema.tables LIMIT 20;
0 Comments
Please Login to Comment Here