首页 > 开发 > 综合 > 正文

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

2024-07-21 02:37:58
字体:
来源:转载
供稿:网友

  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

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表