日期:2014-05-16 浏览次数:20576 次
ALTER TABLE SAMPLE_TBL MODIFY column_name CLOB;
ORA-22858: 数据类型变更无效。
ALTER TABLE SAMPLE_TBL RENAME COLUMN column to column_old;
ALTER TABLE SAMPLE_TBL ADD column CLOB;
DECLARE
CURSOR cu is SELECT * FROM SAMPLE_TBL;
BEGIN
FOR cu_rec IN cu LOOP
UPDATE SAMPLE_TBL SET column = cu_rec.column_old WHERE ID = cu_rec.ID;
END LOOP;
END;
/
ALTER TABLE SAMPLE_TBL DROP (column_old);