Question: Write SQL and PL/SQL code to answer the questions below. 1. Write an anonymous PL/SQL program block that retrieves information about each employee in the

 Write SQL and PL/SQL code to answer the questions below. 1.

Write SQL and PL/SQL code to answer the questions below. 1. Write an anonymous PL/SQL program block that retrieves information about each employee in the employees table in the Human Resources database and creates a list that displays each employee's names, department name, job title, and phone number in five columns on a single line. The list should be in alphabetical order by last then first name. Print column headings as well as a header above the list identifying it as the "ACME Directory." (Note: Use a CURSOR FOR loop, and the only local variable that needs to be declared is a CURSOR.) 2. Write the code for both a sequence and a trigger that will automatically generate a primary key value whenever a record is added to the product_information table in your personal schema. Also write an INSERT and a SELECT statement that shows that your trigger works

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!