当前位置:Gxlcms > 数据库问题 > oracle如何向空表中添加一个类型为clob的非空列

oracle如何向空表中添加一个类型为clob的非空列

时间:2021-07-01 10:21:17 帮助过:14人阅读

Action: Remove the disallowed options.
解决办法: 在update这步执行:update tableName set colName = empty_clob(); 在modify这步执行:alter table tableName modify (colName not null);//不是colName clob not null,这和一般的modify是不同的!!!
示例: alter table post_info add  ( POST_CONTENT CLOB);
update post_info set post_content = empty_clob();
alter table post_info modify (POST_CONTENT not null);
COMMENT ON COLUMN "DBVOP"."POST_INFO"."POST_CONTENT" IS
‘通告内容‘;
commit; ---------------另外:如何将not null 的clob类型的类变为null的列 语法:alter table tableName modify colName null ;

注:EMPTY_BLOB()和EMPTY_CLOB()函数是用来对大数据类型字段进行初始化操作的。

-----------------如何删除列名带空格的列

alter table  cplnt_workorder drop column "CLIENT_ ISSUE"  ;

-----------------如何修改列名

alter table  cplnt_workorder rename column "CLIENT_ ISSUE1" to CLIENT_ ISSUE ;

  http://blog.csdn.net/hjxdreamer/article/details/21230121

oracle如何向空表中添加一个类型为clob的非空列

标签:rac   内容   htm   .net   version   rem   tail   span   convert   

人气教程排行