【问题分类】功能使用

【关键字】YAS-02070

【问题描述】

SQL
create table test01(id int,name varchar(10));
insert into test01 values(1,'zhangsan');
commit;
SQL> alter table test01 add (c1 nclob default ' ' not null);
YAS-02070 table must be empty to add NOT NULL column
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.

【问题原因分析】先判断了是否为空,后写入数据,调整代码实现顺序后即解决。

【解决/规避方法】升级到22.2.7.1及以后的版本

【影响范围】22.2.6.0及以前

【修复版本】22.2.7.1