ORA-00600 When running ALTER command?

后端 未结 2 1917
逝去的感伤
逝去的感伤 2020-12-20 04:14

I am running this command on a table :

ALTER TABLE testTable ADD column1 NUMBER(1) DEFAULT 0 NOT NULL;

And i keep getting this error:

2条回答
  •  臣服心动
    2020-12-20 04:58

    This is a bug, and you need to talk with your dba to make a SR as paxdiablo said.

    If you are pressed for time, you can manually do what does

    ALTER TABLE testTable ADD column1 NUMBER(1) DEFAULT 0 NOT NULL;
    
    1. Add the column as null:

      ALTER TABLE testTable ADD column1 NUMBER(1);
      
    2. Update values:

      update testTable set column1 = 0;
      
    3. Alter table not null(between precedent and this, you must be sure that nobody inserts in the table):

      ALTER TABLE testTable MODIFY(column1  NOT NULL)
      

提交回复
热议问题