Re: question about constraint

From: Snehasis Ganguly <sneha_at_stress.mie.clarkson.edu>
Date: 1996/05/02
Message-ID: <4m989a$m9u_at_library.erc.clarkson.edu>#1/1


Klaus Eichler (ek2918_at_m30x.nbg.scn.de) wrote:
: duffy_at_cais2.cais.com (MCC) wrote:
: >
: >What is the purpose of having a CONSTRAINT in the following statement:
: >
: > CREATE TABLE s_ord
: > (id NUMBER(7),
: > customer_id NUMBER(7)
: > CONSTRAINT s_ord_customer_id nn NOT NULL,
: > .
: > .
: > .
: > );
: >
: > why can't we just define customer_id to NUMBER(7) NOT NULL?
: >Thanks,
: >Duffy
 

: As far as I know, the only difference is the name of the constraint.
: (In USER_CONSTRAINTS it will appear as S_ORD_CUSTOMER_ID instead of
: SYS_Cnnnnn).
: If the constraint is violated, you will not get a more detailed error message
: than with a simple not null constraint.

	Also, it will be possible to drop the constraints first to
	rid the table of all keys and thus go ahead with dropiing the
	table itself.
							Snehasis
Received on Thu May 02 1996 - 00:00:00 CEST

Original text of this message