Hello everyone! I was trying to solve some internet exercises these days, and got some doubts on this one here.
P® represents a pattern drawn by Julia in R rows. The following pattern represents P(5) :
* * * * * * * * * * * * * * *
Write a query to print the pattern P(20) .
I found on internet the solution
SELECT REPEAT(’* ', @NUMBER := @NUMBER - 1) FROM information_schema.tables, (SELECT @NUMBER:=21) t LIMIT 20
But I really didn`t understand this code. Can someone explain me this code, and how is this code able to create 20 new lines?