Question: Hi, I need help with the following problems for my DAT 380 course labs in MindTap on Cengage: Problem 27 Write a procedure named prc_cust_add
Hi,
I need help with the following problems for my DAT 380 course labs in MindTap on Cengage:
Problem 27
Write a procedure named prc_cust_add to add a new customer to the CUST_MYSQL table. Use the following values in the new record:
| CUIST_NUM | CUST_LNAME | CUST_FNAME | CUST_BALANCE |
|---|---|---|---|
| 2003 | Rauthor | Peter | 0.00
|
(You should execute the procedure and verify that the new customer was added to ensure your code is correct.)
Problem 28
Write a procedure named prc_inv_add to add a new invoice record to the INV_MYSQL table. Use the following values in the new record:
| INV_NUM | CUST_NUM | INV_DATE | INV_AMOUNT |
|---|---|---|---|
| 9006 | 2000 | 2018-04-30 | 301.72 |
(You should execute the procedure and verify that the new invoice was added to ensure your code is correct.)
Problem 29
Write a trigger to update the CUST_BALANCE when an invoice is deleted. Name the trigger trg_updatecustbalance2.
(You should delete INV_NUM 9006 from INV_MYSQL to ensure your code is correct.)
Problem 30
Write a procedure to delete an invoice, giving the invoice number as a parameter. Name the procedure prc_inv_delete. Test the procedure by deleting invoices 9000 and 9001
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
