Question: 2. Given the following SQL scripts to create the CUSTOMERS table and the ORDERS table, you want to write additional SQL coding to perform the

2. Given the following SQL scripts to create the2. Given the following SQL scripts to create the2. Given the following SQL scripts to create the

2. Given the following SQL scripts to create the CUSTOMERS table and the ORDERS table, you want to write additional SQL coding to perform the following actions: CF (Note that the foreign key(CONSTRAINT fk_RepID FOREIGN KEY(RepID) REFERENCES Staff(StaffID)) is removed from the above create table code, so you can use the created table to finish the following questions. You can also disregard this note if you have confusion about this. This note won't affect your to finish the following questions ) CREATE TABLE ORDERS PRIMARY KEY(OrdID), CONSTRAINT fk_CustID FOREIGN KEY(CustID) REFERENCES CUSTOMERS(CustID)); a. Add the following values into the CUSTOMERS table: CustID: 100; Name: Jack Sparrow; Address: 345 Viewridge; City: Houston; State: TX; Zip: 77204; AreaCode: 415; Phone: 598-6609; RepID: 7844; CreditLimit: 5000. b. Change the datatype of the column Address in the CUSTOMERS table from VARCHAR(40) to VARCHAR(60). c. Update the CreditLimit of Jack Sparrow from 5000 to 9000 in the CUSTOMERS table. d. Remove the customer Jack Sparrow from the CUSTOMERS table. e. Add a column named "VIPStatus" with the datatype CHAR(1) to the CUSTOMERS table. f. Writing SQL scripts to remove the CUSTOMERS table and the ORDERS table from the database in the correct sequence

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!