Question: PL/SQL CONSIDER THE FOLLOWING TWO RELATIONS: CARD(Balance) CHARGE(ID, ChargeDate, Amount) The CARD table contains a single record representing the balance on a customer's debit card
PL/SQL
CONSIDER THE FOLLOWING TWO RELATIONS:
CARD(Balance)
CHARGE(ID, ChargeDate, Amount) The CARD table contains a single record representing the balance on a customer's debit card at the beginning of a business day. The CHARGE table contains records representing one business day's accumulated charges to be deducted from the debit card. An example state of the two tables is given below:
Complete the anonymous PL/SQL procedure below so that it will update the value of Balance in CARD by applying the set of charges in the CHARGE table and will remove all records from the CHARGE table once CARD has been updated.
DECLARE /* VARIABLE DECLARATIONS */
BEGIN /* PL/SQL CODE TO BE EXECUTED */
END;
BALANCE 2105.79 ID CHARGEDATE AMOUNT 101 20-NOV-19 115.99 102 20-NOV-19 20.01 103 20-NOV-19 500.49 104 20-NOV-19 5.49 105 20-NOV-19 101.01
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
