Found interesting Query to print Christmas Tree -
-------------------
with Mx as (select 60 as MaxWidth from dual)
select decode
( sign(floor(MaxWidth /2)-rownum)
, 1
, lpad( ' ', floor(MaxWidth /2)-(rownum-1)) || rpad( '*', 2*(rownum-1)+1, ' *')
, lpad( '* * *', floor(MaxWidth/2)+3)
)
from all_tables ,Mx
where rownum < floor(MaxWidth /2) + 6;
-------------------
Happy Holidays and Merry Christmas
That's cool query
ReplyDelete