CSD 4203 - Database Programming Practical exercise 4 Exceptions 1) Run provided SQL script and create Employees table if

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

CSD 4203 - Database Programming Practical exercise 4 Exceptions 1) Run provided SQL script and create Employees table if

Post by answerhappygod »

Csd 4203 Database Programming Practical Exercise 4 Exceptions 1 Run Provided Sql Script And Create Employees Table If 1
Csd 4203 Database Programming Practical Exercise 4 Exceptions 1 Run Provided Sql Script And Create Employees Table If 1 (59.66 KiB) Viewed 49 times
CSD 4203 - Database Programming Practical exercise 4 Exceptions 1) Run provided SQL script and create Employees table if you have not one. 2) Write PL/SQL program to ask user to enter employee ID, and find the employee with this id and read his/her salary. In order to assign value to employee id variable, use substitution variable if you use SQL Developer, or assign the value to employee id directly in the code if you use Oracle Live SQL 3) If employee's salary is negative, raise application error with error code -20001 and message 'Salary is negative, must be fixed! 4) If salary is positive, output employee id, full name, and salary. 5) If employee with such id does not exist, process NO_DATA_FOUND exception in Exception block (this exception will be raised by PL/SQL). TEST YOUR PROGRAM: - Run PL/SQL program and enter some ID and submit the screenshot of the output - Update manually some employee's salary to become negative, and test your program if it raises error code -20001 and message 'Salary is negative, must be fixed!' exception. Submit the screenshot - Also, enter some employee ID that does not exist and test if NO_DATA_FOUND exception Is handled. Submit the screenshot of the output. - Submit your PL/SQL program and the screenshots that shows which values you entered for ID and what was the program's output.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply