Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

CUSTOMER_01 (EmailAddress, LastName, FirstName) Write and run an SQL CREATE TABL

ID: 3809827 • Letter: C

Question

CUSTOMER_01 (EmailAddress, LastName, FirstName)

Write and run an SQL CREATE TABLE statement to create the CUSTOMER_01 table.

  

EmailAddress is a text column containing an email address, and is therefore not a surrogate key. CustomerID is a surrogate key that starts at 1 and increments by 1. SaleID is a surrogate key that starts at 20150001 and increases by 1.

The CH07_RQ_TABLES database has the following referential integrity constraints:

EmailAddress in SALE_01 must exist in EmailAddress in CUSTOMER_01

CustomerID in SALE_02 must exist in CustomerID in CUSTOMER_04

The relationship from SALE_01 to CUSTOMER_01 is N:1, O-M.

The relationship from SALE_02 to CUSTOMER_04 is N:1, O-M.

Explanation / Answer

Solution:

ALTER TABLE Customer_01 AUTO_INCREMENT=20150001;

I hope this helps. Don't forget to give a thumbs up if you like this.