Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Not Null Constraints on Primary Key columns

pnoskoJul 5 2007 — edited Jul 9 2007
Hi all. I searched first, but there's too much noise in the results.

My questions follow; assume they apply to 10gR2 in case it makes a difference.

1. In practice, do you or do you not create "not null" constraints on columns that are part of the primary key?

2. It isn't needed, so if you do, why? (I suspect "habit".)

I can anticipate a reply that using both lets you disable the primary key constraint and still prevent null columns, although I fail to see how that is useful.

3. Finally, if you create both, is there actual execution overhead?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2007
Added on Jul 5 2007
12 comments
3,515 views