如何用SQL字段从LONGROW类型改为BLOB类型

发表于:2007-05-25来源:作者:点击数: 标签:sqlLONGROW改为何用字段
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