直接从varchar2 修改为clob会报错,不让修改,可以先修改为Long类型,然后从Long修改为clob .
而且更改为long,必须是 ORA-01439: 要修改的資料欄必須是空的, 才可以變更資料庫
You can use the ALTER TABLE statement in SQL to convert a LONG column to a LOB column. To do so, use the following syntax:
ALTER TABLE [.] MODIFY ( <long_column_name> { CLOB | BLOB | NCLOB } [DEFAULT >]) [LOB_storage_clause];
For example, if you had a table that was created as follows:
CREATE TABLE Long_tab (id NUMBER, long_col LONG);
then you can change the column long_col in table Long_tab to datatype CLOB using following ALTER TABLE statement:
ALTER TABLE Long_tab MODIFY ( long_col CLOB );
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/35489/viewspace-85019/ ,如需转载,请注明出处,否则将追究法律责任。