`
xiaomogui
  • 浏览: 239402 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

ORA-00997 非法使用LONG 数据类型

阅读更多

long列是不允许出现在 create table xx as select * from yyy


 里的
In addition, LONG columns cannot appear in these parts of SQL statements:
....
SELECT lists of

CREATE TABLE ... AS SELECT statements

 
.....
oracle建议使用clob\blob\nclob来代替。
如:

create table t(a int,b long); insert into t values(1,'1');

 --可以这样创建,不过默认类型就成了clob

create table t1 as select a,to_lob(b) from t;

 
--也可以这样,先创建一个表,然后在插入数据时使用to_lob函数转换一下

create table t2 (a int,b long); insert into t2 select a,to_lob(b) from t;


 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics