PL / SQL : Code an application that permits the user to enter new fast food items (copy_f_food_items). The policy

PL / SQL : Code an application that permits the user to enter new fast food items (copy_f_food_items). The policy

Question:

PL / SQL : 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!  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.

Expert Answer:

Answer rating: 100% (QA)

Here is the PL SQL code for both 3 a and 3 b DECLARE food code NUMBER food code description
View the full answer