Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Not Null constraint
Joel Garry wrote:
> See if user_constraints says dvordtm is the same on both databases.
>
> select status, constraint_name, constraint_type, search_condition from
> user_constraints where table_name = 'DVORDTM
> order by constraint_type, constraint_name';
>
> jg
> --
> @home.com is bogus.
> http://www.heptune.com/farts.html
Hi,
Please check whether this column is a part of Unique or Primary Key Constraint. If it is, then the not null definition will not be copied onto another table. See this :
SQL> desc test_normal
Name Null? Type ----------------------------------------- -------- ---------------------------- EMPNO NUMBER(10) ENAME VARCHAR2(30) DEPTNO NUMBER(2) SAL NUMBER(10)
SQL> alter table test_normal add constraint pk_test primary key(empno, ename);
Table altered.
SQL> desc test_normal
Name Null? Type ----------------------------------------- -------- ---------------------------- EMPNO NOT NULL NUMBER(10) ENAME NOT NULL VARCHAR2(30) DEPTNO NUMBER(2) SAL NUMBER(10)
SQL> create table test_vivek as select empno from test_normal where 1=2;
Table created.
SQL> desc test_vivek
Name Null? Type ----------------------------------------- -------- ---------------------------- EMPNO NUMBER(10)
Regards
Vivek
Received on Fri Jan 06 2006 - 08:01:07 CST
![]() |
![]() |