Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Check records you have in both CUSTOMER and INVOICE tables. SELECT * FROM CUSTOMER; SELECT * FROM INVOICE ; Page 1 of 4 Tasks to

image text in transcribed

Check records you have in both CUSTOMER and INVOICE tables. SELECT * FROM CUSTOMER; SELECT * FROM INVOICE ; Page 1 of 4 Tasks to do 1. Write a trigger named TRG_UPDATE_CUST_BALANCE to update the CUST_BALANCE in the CUSTOMER table when a new invoice is added in the INVOICE table. The value of the INV_AMOUNT column of the new invoice should be added to the respective customer's balance in the CUSTOMER table. Test the trigger by adding the following new invoice record in the INVOICE table. \[ \begin{array}{l} \text { INV_NUM }=8005 \\ \text { CUST_NUM }=1001 \\ \text { INV_DATE }=27-\text { Apr-2016 } \\ \text { INV_AMOUNT }=225.40 \end{array} \] It should add the INV_AMOUNT of 225.40 to the balance of the customer (CUST_NUM = 1001) in the CUSTOMER table

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions