Home » RDBMS Server » Server Administration » enable novalidate
enable novalidate [message #53258] Mon, 09 September 2002 07:14 Go to next message
Xin
Messages: 3
Registered: July 2002
Junior Member
I am trying to modify a column to from null to not null without locking the table. I used the command 'alter table modify column not null enable novalidate'. It does add the not null constraint, but does not change the column "NULLABLE" on the all_tab_columns table to "N". To change the "NULLABLE" to "N", the not null constraint has to be validated. So I tried to use 'alter table modify constraint validate'. I thought when this command is issued, the table will not be locked, but it seemed to be when I tested. Does anyone has any idea how I can change a column from null to not null without locking the table at all on oracle 8.1.7??

Thanks
Re: enable novalidate [message #53259 is a reply to message #53258] Mon, 09 September 2002 07:36 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
-->anyhow this is not answering your question
unless to validate the constraint, it wont appear in the views~
SQL> ed
Wrote file afiedt.buf

  1* alter table dept modify loc not null enable novalidate
SQL> /

Table altered.

SQL> desc dept
 Name                                                  Null?    Type
 ----------------------------------------------------- -------- ------------------------------------
 DEPTNO                                                         NUMBER(2)
 DNAME                                                          VARCHAR2(14)
 LOC                                                            VARCHAR2(13)
 SQL> ed
Wrote file afiedt.buf

  1  ALTER TABLE dept
  2*     ENABLE VALIDATE CONSTRAINT SYS_C00869
SQL> /

Table altered.

SQL> desc dept
 Name                                                  Null?    Type
 ----------------------------------------------------- -------- ------------------------------------
 DEPTNO                                                         NUMBER(2)
 DNAME                                                          VARCHAR2(14)
 LOC                                                   NOT NULL VARCHAR2(13)

SQL> 

Previous Topic: Oracle 8 Release 2 on Windows XP
Next Topic: CHECK CONSTRAINT
Goto Forum:
  


Current Time: Thu Sep 19 16:19:36 CDT 2024