日期:2014-05-16 浏览次数:20787 次
WITH TEST AS
(SELECT 'AAA' c1, '3' c2
FROM dual
UNION ALL
SELECT 'BBB', '2'
FROM dual
UNION ALL
SELECT 'CCC', '4' FROM dual)
select c1
------解决方案--------------------
'_'
------解决方案--------------------
level
from test
connect by level <= to_number(c2)
and c1 = prior c1
and prior dbms_random.value is not null;
WITH TEST AS
(SELECT 'AAA' c1, '3' c2 FROM dual UNION ALL
SELECT 'BBB', '2' FROM dual UNION ALL
SELECT 'CCC', '4' FROM dual)
SELECT DISTINCT c1
------解决方案--------------------
'_'
------解决方案--------------------
LEVEL cc FROM test
CONNECT BY level<=to_number(c2) ORDER BY cc