Re: question about constraint
Date: 1996/04/30
Message-ID: <4m5218$p0n_at_krel.iea.com>#1/1
MCC (duffy_at_cais2.cais.com) 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?
You can. The difference being your desired method tells Oracle to name the constraint some semi-cryptic name system generated name. The other method forces a constraint name of `s_ord_customer_id'. Did you miss an underscore between the id and nn?. Of course I'm still using Oracle 6 and sitting at home and therefore I don't have my trusty manuals handy so I'm probably confused about the nn.
: Thanks,
: Duffy
Received on Tue Apr 30 1996 - 00:00:00 CEST