Question: I need a PL/SQL code below question 3) Code an application that permits the user to enter new fast food items (copy_f_food_items). The policy of

I need a PL/SQL code below question

3) Code an application that permits the user to enter new fast food items (copy_f_food_items). The policy of the company is that the food item number must be between 70 and 100. Code a block that only permits codes between 70 and 100 to be entered. Explicitly raise an exception if entry of any other code is attempted. Run the block 2 times using the data below. Note: In most instances in a real world application, a restriction on the values entered into a column will be coded as a CHECK constraint.

Run 1: Food code 75, description Burger, price $3.55

Run 2: Food code 20, description Chicken, price $4.15

IMPORTANT: Copy the f_food_items table to copy_f_food_items first!

3-a) Code the block using RAISE. When an exception is thrown, display the message Invalid food item code; only 70-100 permitted. Display the entire window and then SELECT * FROM copy_f_food_items for each run.

Run 1:

Run 2:

3-b) Modify the code from 3-a to use RAISE_APPLICATION_ERROR.

Run 1:

Run 2:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!