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: RSH <RSH_Oracle_at_worldnet.att.net>
Date: Fri, 22 Feb 2002 20:59:10 GMT
Message-ID: <yiyd8.6380$Im1.442261@bgtnsc05-news.ops.worldnet.att.net>


I avoid allowing the system to name anything if I can. I hate things like:

SYS_0121 whatever. Error messages are a good point, even looking into the system in an emergency to fix a problem, PK_PERS_IDX beats SYSxxx any day of the week.

RSH. "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message news:j61d7u4f8d0bnkbq7jccprniu6bac2rt22_at_4ax.com...
> On 22 Feb 2002 09:08:53 -0800, vishalnm_at_yahoo.com (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)
>
>
> There is no difference. The only reason to have a table level not null
> check constraint is you want to avoid system generated names.
> That can be useful when you want to derive end user-friendly error
> messages from your exceptions.
> IMO this means it is pretty useless to define a table level check
> constraint with a system generated name.
>
> Regards
>
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address
Received on Fri Feb 22 2002 - 14:59:10 CST

Original text of this message

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