SQL> select decode
2 ( sign(floor(maxwidth/2)-rownum)
3 , 1, lpad( ' ', floor(maxwidth/2)-(rownum-1))
4 || rpad( '*', 2*(rownum-1)+1, ' *')
5 )
6 from all_objects,
7 (select 10 as maxwidth from dual)
8 where rownum
DECODE(SIGN(FLOOR(MAXWIDTH/2)-ROWNUM),1,LPAD('',FLOOR(MAXWIDTH/2)-(ROWNUM-1))||R
--------------------------------------------------------------------------------
*
* *
* * *
* * * *