当前位置: 移动技术网 > IT编程>数据库>Oracle > 转换CLOB字段类型为VARCHAR2, lob类型不支持的sql语句

转换CLOB字段类型为VARCHAR2, lob类型不支持的sql语句

2019年02月19日  | 移动技术网IT编程  | 我要评论

河津人才市场,卷筒卫生纸,女演员江珊现任老公

转自:https://blog.csdn.net/e_wsq/article/details/7561209

步骤:

1.建立一个临时varchar2字段用来保存数据

2.将clob的内容截取后更新到varchar2字段中

update table_wonder set tempcolumn = dbms_lob.substr(clobcolumn,4000);

3.drop掉clob字段

4.将临时varchar2字段改名

alter table table_wonder rename column tempcolumn to column;

另外rename语句在9.2以上版本支持,在pl/sql developer 7.0版本的command window中不支持,需要使用sqlplus。

列出lob类型不支持的sql语句

 

不支持的语句不支持的用法例子
select distinct

select distinct clobcol from...

select clause           

order by

select... order by clobcol

select clause           

group by

select avg(num) from...

group by clobcol

union, intersect, minus           

(note that union all works for lobs.)

select clobcol1 from tab1 union select clobcol2 from tab2;

join queries

select... from... where tab1.clobcol = tab2.clobcol

index columns

create index clobindx on tab(clobcol)...

 

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网