Question: Using SQL developer. idk how to be more specific. the direction is in the question. This is a sQL based question. Part 01 In this

Using SQL developer. idk how to be more specific. the direction is in the question. This is a sQL based question.

Using SQL developer. idk how to be more specific. the direction isin the question. This is a sQL based question. Part 01 In

Part 01 In this part you will learn how to create and use triggers: 1. Create a table called Employees_Archives that has the same columns as employees table and it also has a column that is called "Deletion_Date" 2. Create a Trigger on table Employees so that every time a record is deleted this same record is inserted in table Employees_Archives with the current date as Deletion_Date 3. Now give an example of execution. Insert a new employee into table Employees and then delete it. Is the record inserted correctly into table Employees_Archive? What will happen if you delete more than one records at the same time? Part 02 In this part we will learn how to use functions: 1. Create a function that has the Employee_id as input and returns a number that represents the total number of Positions (counted by unique job_ids) that this employee has had. Notice that you will need to take into account both hislher current iob id in emplovees table as. it also has a column that is called "Deletion_Date" 2. Create a Trigger on table Employees so that every time a record is deleted this same record is inserted in table Employees_Archives with the current date as Deletion_Date 3. Now give an example of execution. Insert a new employee into table Employees and then delete it. Is the record inserted correctly into table Employees_Archive? What will happen if you delete more than one records at the same time? Part 02 In this part we will learn how to use functions: 1. Create a function that has the Employee_id as input and returns a number that represents the total number of Positions (counted by unique job_ids) that this employee has had. Notice that you will need to take into account both his/her current job_id in employees table as well as the previous positions in Job_History. 2. Now use the function: Write a select statement that selects all the employees and the total number of positions they have ever had

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!