求select查询语句
求select查询语句
日期:2015-08-20 09:59:42 人气:1
select dm,lvl from
(select dm,lvl,sl from test1 a,
(select level lvl from dual connect by level<=(select max(sl)-min(sl)+1 from test1)) b
where b.lvl<=a.sl
) t1
where sl is not null;
试着查询了下,如果是上面的数据,查询结果可以出来,不过一直没想好level的条件,这里只用了max(sl)-m