select row_number() over(order by zhou,name) as rn,zhou,name,zl
from table
order by rn
查询只有5行,但是我想显示10行,后面5行用空白填充
希望得到结果
------解决思路----------------------
select t.*
from (select rownum as a,
row_number() over(order by zhou, name) as rn,
zhou,
name,
zl
from table
order by rn) t
full join (select rownum as b from dual connect by rownum <= 10) e
on t.a = e.b
写了一个比较笨的办法,不过应该可以用,看看大家都有什么好办法。