 <p><a href="http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions140.htm" rel="nofollow">RPAD</a> should work</p> <pre><code>select RPAD('*', rank, '*') from soldiers; </code></pre> <p>But this kind of formatting is also easily done client-side (if you have an application between you and the database and are not just using an SQL prompt directly).</p>