如何将一个表中多行的数据合并到新表中的单个列中?如何在新表中将多行数据合并到单列中?
create table new_paragraphs
(
id NUMBER
paragraph CLOB
);
create table old_paragraphs
(
id
paragraph CLOB
);
merge into new_paragraphs a
using (select * from old_paragraphs) b
on (id = id)
when matched then
update set a.paragraph = a.paragraph || b.paragraph;
-- Results in error: unable to get a stable set of rows in the source tables
上面抛出异常。
其实,这导致'ORA-00918:列含糊defined'。 – 2012-01-13 21:27:26