ORA-01758 table must be empty to add mandatory (NOT NULL) column
501645Apr 26 2006 — edited Oct 26 2012ORA-01758 table must be empty to add mandatory (NOT NULL) column
Cause: It is not possible to define a new column as NOT NULL if rows already exist in the table being modified.
Action: Retry the statement without the NOT NULL specification.
SQL> describe TABLE_A
Name Null? Type
----------------------------------------- -------- ---------------
COL_1 NOT NULL VARCHAR2(10)
COL_2 VARCHAR2(6)
COL_3 VARCHAR2(50)
COL_5 VARCHAR2(8)
COL_6 NOT NULL TIMESTAMP(6)
COL_7 NOT NULL NUMBER
COL_8 VARCHAR2(50)
COL_9 NUMBER(2)
COL_10 NUMBER(2)
COL_11 NUMBER(2)
hi guys..Im creating a new column thru TOAD and sqlplus but i encountered same error. the columns that im going to make must be NOT NULL..how can i make a new column in TABLE_A. i tried this but error. also in toad i click add columns but also error. thanks
SQL> ALTER TABLE TABLE_A ADD (COL_12 VARCHAR2(10) NOT NULL)
ORA-01758 table must be empty to add mandatory (NOT NULL) column
ALTER TABLE IPIS_ADM.R_SSLOT ADD(NODE_ID VARCHAR2(10) NOT NULL)