HackerRank MySQL - Draw The Triangle 2




P(R) represents a pattern drawn by Julia in R rows. The following pattern represents P(5):

Write a query to print the pattern P(20).



  1. set @row := 0;
  2. select repeat('* ', @row := @row + 1) from information_schema.tables where @row < 20




codesadda.com

Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube