Mid Term Sample Questions Database II
1. Write a PL/SQL procedure to reduce the cost of each car by a percent that is passed
as an argument to the procedure.
2. Write a procedure to display three (3) Car_group_name and Rate_per_day values
that have the lest expensive Rate_per_day values listed in ascending order.
NOTE : You need a cursor so that you can FETCH the first three rows.
3. Write a trigger to display the customer number of customer when the customer tries to
book a car and has reserved at least one car in the last three days.
due and assigns it to v_amount_due. The computation of amount due is:
Rental_period*Rate_per_day + (Miles_in - Miles_out)*Rate_per_mile. It then
outputs the v_amount_due to the screen.
Note : You may not use the Amount_due column in this problem.