MySQL限定ですが。。。

create temporary table test1(num int);
insert test1 (num) values(0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(2),(2),(2);
select concat(repeat(' ',9-num),repeat('#',num*2-1)) from test1;



You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply