Add constraints on Customer (part e)
parent
c5f807f958
commit
e0468e48fb
|
@ -14,7 +14,9 @@ CREATE TABLE Customer(
|
|||
lastName VARCHAR2(15),
|
||||
address VARCHAR2(30),
|
||||
phone NUMBER(10),
|
||||
CONSTRAINT Customer_pk PRIMARY KEY(customerID)
|
||||
CONSTRAINT Customer_pk PRIMARY KEY(customerID),
|
||||
CONSTRAINT Customer_U1 UNIQUE(firstName, lastName, phone),
|
||||
CONSTRAINT Customer_phoneNumber_Val CHECK (phone IS NOT NULL)
|
||||
);
|
||||
CREATE SEQUENCE customerID_seq;
|
||||
|
||||
|
|
Loading…
Reference in New Issue