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: Difference between table level and column level NOT NULL constraint?

Re: Difference between table level and column level NOT NULL constraint?

From: Howard J. Rogers <dba_at_hjrdba.com>
Date: Sat, 23 Feb 2002 05:21:13 +1100
Message-ID: <1014402127.660704@bugstomper.ihug.com.au>


He's talking about the difference between an inline constraint and an out-of-line constraint (or, indeed, a constraint that is added later via an alter table command, which is about as out-of-line as it is possible to be).

I can see why they appear to be table level constraints... the command is, after all, 'alter table'. Try being a little more charitable.

Anyway, Vishalm, a constraint is a constraint is a constraint. No difference anywhere or any how they're applied.

Regards
HJR

--
----------------------------------------------
Resources for Oracle: http://www.hjrdba.com
===============================


"damorgan" <dan.morgan_at_ci.seattle.wa.us> wrote in message
news:3C768631.F22ABEB6_at_ci.seattle.wa.us...

> there is no such thing as a TABLE LEVEL not null. A not null column is a
> not null column. They are all defined as a check constraint.
>
> Daniel Morgan
>
>
>
>
> Vishalm wrote:
>
> > Hi,
> >
> > What is the difference between table level and column level NOT NULL
> > constraint?
> >
> > for e.g.a not null constraint can be defined in the foll ways
> >
> > 1)
> >
> > Create table test
> > (testnull VARCHAR2(10) NOT NULL)
> >
> > 2)
> >
> > Create table test
> > (testnull VARCHAR2(10));
> >
> > ALTER TABLE ADD CHECK (testnull NOT NULL);
> >
> > Is there any difference in the way Oracle does validation for the
> > above defined constraint methods or are there any performance
> > differences?
> >
> > Thanx in advance.
> >
> > regards,
> > Pradeep
> >
> > (Pls cc ur response to : pradeep.mittal_at_iflexsolutions.com)
>
Received on Fri Feb 22 2002 - 12:21:13 CST

Original text of this message

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