Question: Modify Table Lab Create the following tables in SQL Server (code is supplied CREATE TABLE Customer (cust id INT PRIMARY KEY company_name VARCHAR (30), company

 Modify Table Lab Create the following tables in SQL Server (code

Modify Table Lab Create the following tables in SQL Server (code is supplied CREATE TABLE Customer (cust id INT PRIMARY KEY company_name VARCHAR (30), company age INT c address VARCHAR (30). c_city VARCHAR (25), c state VARCHAR (25), c zip INT ave earnings NUMERIC (8, 2), poc last _name VARCHAR (30), poc phone VARCHAR (20), poc_pin INT) CREATE TABLE sales (sales id INT PRIMARY KEY sale date DATETIME quantity INT) Do the following: 1. Add a field to the sales table (customer) and add a foreign key constraint to it. The FK is required! 2. Modify the c zip field to be a 15 character length text field 3. Change the length of the c state field to make it a length of 2 (as it should be), and make it a fixed length data type. 4. Change ave earnings to a money data type. 5. Rename the quantity field to qty bought. 6. Delete the poc_pin field 7. Drop the sales id primary key constraint (sales table). 8. Drop the sales table

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 Databases Questions!