From e0468e48fb702e324ac5b1507a96cad7c2550caa Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Mon, 26 Aug 2019 22:54:49 -0400 Subject: [PATCH] Add constraints on Customer (part e) --- Cruise.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Cruise.sql b/Cruise.sql index 148cd4f..e93ad2a 100644 --- a/Cruise.sql +++ b/Cruise.sql @@ -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;