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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: oracle not null question

RE: oracle not null question

From: Cale, Rick T (Richard) <RICHARD.T.CALE_at_saic.com>
Date: Tue, 17 Oct 2000 08:27:42 -0700
Message-Id: <10652.119477@fatcity.com>


You are correct on all accounts.

Rick

> -----Original Message-----
> From: John Dunn [SMTP:john.dunn_at_sefas.co.uk]
> Sent: Tuesday, October 17, 2000 11:26 AM
> To: Multiple recipients of list ORACLE-L
> Subject: oracle not null question
>
> > We've used the Oracle Schema Manager to create tables for us, and the
> SQL
> > it has used is e.g. ...
> >
> > CREATE TABLE
> > JOBS
> > (JOBSKEY NUMBER(4,0) NOT NULL,
> > DOCUMENT_TYPE VARCHAR2(20) NOT NULL,
> > JOB_RECEIVED_DATE DATE NOT NULL,
> > DESCRIPTION VARCHAR2(250) NOT NULL,
> > FILE_SIZE NUMBER(12,0) NOT NULL,
> > NUMBER_OF_DOCUMENTS NUMBER(9,0) NULL,
> > NUMBER_OF_PAGES NUMBER(9,0) NULL,
> > CHECK (JOBSKEY IS NOT NULL),
> > CHECK (DOCUMENT_TYPE IS NOT NULL),
> > CHECK (JOB_RECEIVED_DATE IS NOT NULL),
> > CHECK (DESCRIPTION IS NOT NULL),
> > CHECK (FILE_SIZE IS NOT NULL),
> > PRIMARY KEY (JOBSKEY))
> > PCTFREE 20 PCTUSED 60 INITRANS 2 MAXTRANS 255 STORAGE ( INITIAL 24K NEXT
> > 44K MINEXTENTS 1 MAXEXTENTS 249 PCTINCREASE 0)
> > TABLESPACE "USERS";
> >
> > The question is, what is the difference between putting NOT NULL by each
> > field definition in the table, and the CHECK condition (apparently)
> doing
> > the same thing?
> >
> > Also, doesn't setting the Primary Key to JOBSKEY imply that it cannot be
> > NULL anyway?
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: John Dunn
> INET: john.dunn_at_sefas.co.uk
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Tue Oct 17 2000 - 10:27:42 CDT

Original text of this message

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