how to print star using sql

my sql printing pattern sql 8 months, 1 week ago
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;
142
Instructions

output:
*
* *
* * *
* * * *
* * * * *
* * * * * *

Posted By