Question: Write a PL/SQL code: write an anonymous block program unit that inserts a user-input value into employees table and prints a message 'record is inserted

Write a PL/SQL code:

write an anonymous block program unit that inserts a user-input value into employees table and prints a message 'record is inserted successfully' as following:

Employee_id: user-input

Last name: user-input

First_name: user-input

Department_number: user-input

Manager_id : user-input ( nullable)

The program raises an exception if "dup_val_on_index" and print the message "department number is duplicated".

Try two cases:

Input values (employee_id:110, last_name : Bandarus, first_name: Prakash, department_number : 3, Manager_id:8)

Input values (employee_id: 8, last_name : Mark, first_name: Smith, department_number : 8, Manager_id:Null)

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!