View the step-by-step solution to:

PL/SQL make a stored procedure which accepts a customer name as a parameter and "returns" the number of cars the customer has bought and...

PL/SQL


make a stored procedure which accepts a customer name as a parameter and "returns" the number of cars the customer has bought and total amount of money he/she has spent.

  1. Test the above procedure by writing a script which:
  • prompts the user for a beginning letter
  • prompts the user for an ending letter
  • calls the procedure to show the total spent and the number of cars purchased by each customer whose name begins with a letter between the beginning and ending letters (inclusive). For example if the beginning letter is "A" and the ending letter is "D", the result should show all the customers whose name begins with A, B, C and D. If "A" and "Z" is entered the result should show all customers.
  • Use a cursor and include appropriate exception handling.

Hint:

  • See REGEXP_LIKE operator on how to find the names that begin with letters included between two given values.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question