I am working on some code and am having trouble withe the final part involving an implicit cursor. The spec is as follows;
Write an anonymous block that meets the following specification: 1.Using an explicit cursor, retrieve each row from the i_customer table. 2.Create a local (declared) variable (rowtype) that inherits the structure of the i_customer table. Place each row returned into this variable. 3.Using an implicit cursor, calculate the number of cars that customer has rented. 4.Display the customer name and the total number of cars that customer has rented.
The tables is as follows;
I have doen code but had no luck as of yet with the final 2 this is the working code I have produced so far. Any assistance would be greatly appreciated.
CURSOR cur_icustomer IS
FROM i_customer ;
FETCH cur_icustomer INTO rec_icustomer;
EXIT WHEN cur_icustomer%NOTFOUND;