日期:2014-05-17 浏览次数:20708 次
insert into b select col1, col2, col3 ------解决方案-------------------- to_char(rownum) from a; 其中 col3 就是你要做主键的字段,试试看
SELECT col1, col2, col3 ------解决方案-------------------- DECODE (n, 1, NULL, n) col3 FROM (SELECT col1, col2, REVERSE (col3) col3, ROW_NUMBER () OVER (PARTITION BY col3) n FROM a)