Could you please help me on this MySQL questions (Please answer Q9 to Q15) . I g
ID: 3699252 • Letter: C
Question
Could you please help me on this MySQL questions (Please answer Q9 to Q15). I got answers to Q1-Q8 from another expert earlier. Please send me results if possible. Appreciate your help
Make the following changes to the Premiere Products database (PL SEE BELOW). After each change, execute an appropriate query to show the change was made correctly. Do not commit your changes unless instructed to do so.
1. Type SET AUTOCOMMIT = 0; to turn off AUTOCOMMIT in your client.- (No Need answer (Already answerd ealier))
2. Create a NONAPPLIANCE table with the structure shown in the figure below: -(No Need answer (Already answerd ealier))
Column Name Data Type Length Decimal Places Null Allowed? Description -(No Need answer (Already answerd ealier))
PART_NUM CHAR 4 NO Part number (primary key)
DESCRIPTION VARCHAR 15 Part description
ON_HAND INTEGER 4 Number of units on hand
CLASS CHAR 2 Item class
PRICE DECIMAL 6 Unit price
3. Add rows to the NONAPPLIANCE table by taking the part number, part description, number of units on hand, item class, and unit price from the PART table for each part that is not in the class AP. -(No Need answer (Already answerd ealier))
4. Commit this transaction. -(No Need answer (Already answerd ealier))
5. In the NONAPPLIANCE table, change the description of the part number AT94 to “Deluxe Iron.” -(No Need answer (Already answerd ealier))
6. Rollback this transaction, execute a query that demonstrates the transaction was rolled back, and then reissue the change with a commit.-(No Need answer (Already answerd ealier)
7. In the NONAPPLIANCE table, increase the price of each item in the SG class by 2%.-(No Need answer (Already answerd ealier))
8. Add the following part to the NONAPPLIANCE table:-(No Need answer (Already answerd ealier))
PART_NUM DESCRIPTION ON_HAND CLASS PRICE
TL92 TRIMMER 11 HW 29.95
Please answer all the questions below
9. Delete every part in the NONAPPLIANCE table for which the class is SG.
10. Commit all pending transactions.
11. In the NONAPPLIANCE table, change the class for the part FD21 to NULL, and commit the change.
12. Add a column named QTY_VALUE to the NONAPPLIANCE table. The quantity value is a sevendigit number with two decimal places that represents the product of the quantity on hand and the unit price. Then set all values of QTY_VALUE to ON_HAND * PRICE.
13. Commit this change.
14. In the NONAPPLIANCE table, increase the length of the DESCRIPTION column to 30 characters.
15. Remove the NONAPPLIANCE table from the Premiere Products database. Execute command to demonstrate the table no longer exists. 16. Exit the MySQL client.
MySQL Database file:
Explanation / Answer
9.delete from NONAPPLIANCE
where Class='SG';
10.commit;
11.update NONAPPLIANCE
set Class='NULL'
where part='FD21'
commit;
12.alter table NONAPPLIANCE
QTY_VALUE decimal(7,2)
update NONAPPLIANCE
set QTY_VALUE=select ON_HAND*Price from NONAPPLIANCE;
13.commit;
14.alter table NONAPPLIANCE
alter column DESCRIPTION varchar(30);
15.Drop table PremiereProducts.NONAPPLIANCE
16.exit;