We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
FOR SQL SERVER
with starpattern as (
select 20 as num
union all
select num -1
from starpattern
where num>1
)
select replicate('* ',num)as stars
from starpattern
option(maxrecursion 0);
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Draw The Triangle 1
You are viewing a single comment's thread. Return to all comments →
FOR SQL SERVER with starpattern as ( select 20 as num union all select num -1 from starpattern where num>1 ) select replicate('* ',num)as stars from starpattern option(maxrecursion 0);