oracle跨库转换数据,将long row类型转为blob,如何解决?

0
已邀请:
1

老头子 - 专注是唯一的捷径 2016-07-08 回答

LONG这个类型Oracle后续版本已经不再维护了,要尽快转
使用CTAS创建一个表和以前表一样,但是对应的LONG改成LOB

    Before using this function, you must create a LOB column to receive the converted LONG values. To convert LONG values, create a CLOB column. To convert LONG RAW values, create a BLOB column.
    You cannot use the TO_LOB function to convert a LONG column to a LOB column in the subquery of a CREATE TABLE ... AS SELECT statement if you are creating an index-organized table. Instead, create the index-organized table without the LONG column, and then use the TO_LOB function in an INSERT ... AS SELECT statement.


比如:
table_long是以前的表
 
create table table_lob as select xxx,xxx,xxx,to_lob(以前的long字段) from table_long

要回复问题请先登录注册