write the code to add a new column to the \"CUSTOMER\" table to store each custo
ID: 3738127 • Letter: W
Question
write the code to add a new column to the "CUSTOMER" table to store each customer's phone number. You: #4. make up a meaningful name of the new attribute, choose the most appropriate data type and size the field correctly. Write the code to create in a table named "EMPLOYEE" that has 3 attributes: a name, a state and a zip code. #5. Use good attribute names and appropriate data types. Write the code to delete all of the employees in a table named "EMPLOYEE" who reside in Florida. Assume that the table "EMPLOYEE" has an attribute "state" that is exactly 2 characters Also, the state of Florida would be "FL" #6. NOTE: Please look at the "Study Questions" that I put in Canvas over the Spring Break to help you practice for the Midterm Exam.Explanation / Answer
Answer:
1.ALTER TABLE CUSTOMER ADD CONTACT_NUMBER INT;
/*This query will add the new column to the Customer table*/
The output will be like table has been modified.
2.CREATE TABLE EMPLPOYEE
(
NAME varchar(50),
STATE varchar(2),
ZIP CODE int,
);
/*This query will create a new table called Employee with Name,state,Zip code as columns*/
Sample Output:
Table(s) has been created
3.DELETE FROM EMPLOYEE WHERE STATE LIKE "FL"
/*This query will delete the records from Employee where employees from Florida*/
Sample Output:
6 row(s) affected
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.