如何用SQL字段从LONGROW类型改为BLOB类型
SQL> select count(*) from sys.IDL_UB1$; COUNT(*) ---------- 4003 SQL> desc sys.IDL_UB1$ Name Null? Type OBJ# NOT NULL NUMBER PART NOT NULL NUMBER VERSION NUMBER PIECE# NOT NULL NUMBER LENGTH NOT NULL NUMBER PIECE NOT NULL LONG RAW SQL> cre
SQL> select count(*) from sys.IDL_UB1$;
COUNT(*)
----------
4003
SQL> desc sys.IDL_UB1$
Name Null? Type
OBJ# NOT NULL NUMBER
PART NOT NULL NUMBER
VERSION NUMBER
PIECE# NOT NULL NUMBER
LENGTH NOT NULL NUMBER
PIECE NOT NULL LONG RAW
SQL> create table system.rawtolob(obj,part,version,piece#,length,piece)
2 as
3 select obj#,part,version,piece#,length,to_lob(piece) from sys.idl_ub1$;
Table created.
SQL> select count(*) from rawtolob;
COUNT(*)
----------
4003
SQL> desc rawtolob
Name Null? Type
OBJ NOT NULL NUMBER
PART NOT NULL NUMBER
VERSION NUMBER
PIECE# NOT NULL NUMBER
LENGTH NOT NULL NUMBER
PIECE BLOB
原文转自:http://www.ltesting.net
|