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
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.
Step by Step Solution
3.51 Rating (154 Votes )
There are 3 Steps involved in it
Here is the PLSQL code for both 3a and 3b DECLARE foodcode NUMBER foodcode description ... View full answer
Get step-by-step solutions from verified subject matter experts
