Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL*Plus - PK Question

Re: SQL*Plus - PK Question

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 23 Apr 2002 03:46:23 -0700
Message-ID: <a20d28ee.0204230246.7db6d03f@posting.google.com>


"Sted Alana" <Sted_Alana_at_hotmail.com> wrote in message news:<3cc506ff_1_at_news.iprimus.com.au>...
> I have come across many examples in sql*plus with regards to using 'not
> nulls' in conjunction with primarys keys. This bothers me because from my
> reading when a primary key is defined for an attributes(s) of a table, it
> assumes that those values cannot contain null values, but yet i see this:
>
> create table Example
> (
> sid char(5) not null,
> ....
> constraint pk_sid primary key (sid)
> );
>
> why need to use not null when primary key implicitly imposes that contraint?
>
> Any help appreciated.

Why don't you have try to leave out the not null? I have the faint feeling Oracle will create it for you because of the PK

Hth

Sybrand Bakker
Senior Oracle DBA Received on Tue Apr 23 2002 - 05:46:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US