我DML
用WITH
语句写了这个简单的例子:
WITH seq AS
(SELECT to_char(LEVEL - 1) p FROM dual CONNECT BY LEVEL <= 10)
SELECT old_value,
new_value
FROM (SELECT to_char(t1.p) old_value,
to_char(t2.p) new_value
FROM (SELECT row_number() over(ORDER BY p) rn,
p
FROM seq) t1,
(SELECT row_number() over(ORDER BY dbms_random.random) rn,
p
FROM seq) t2
WHERE t1.rn = t2.rn);
有没有办法在语句WITH
中使用语句INSERT
?