Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL Create the following table: greate table audit emp aation varchar? (20), date asti date default sysdate) Create the following trigger: CREATE OR REPLACE TRIGGER

image text in transcribed

SQL

Create the following table: greate table audit emp aation varchar? (20), date asti date default sysdate) Create the following trigger: CREATE OR REPLACE TRIGGER audit e AFTER DELETE ON employees For EACH ROW BEGIN IE DELETING THEN INSERT INTO audis emp VALUES (USER 'DELETE' SYSDATE) END IF END: Modify the trigger and test: Perform the following: . Now modify the trigger to include an audit trail in case the employees table is changed with an UPDATE or INSERT, (Hint: you may want to use the conditional predicates INSERTING or UPDATING). Once you have made your changes test by (1) adding a new employee, (2) then make a change to the employee you added and (3) finally deleting the employee you added. . . Use a SELECT statement to display the contents of the audit emp table

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Project Management A Systems Approach to Planning Scheduling and Controlling

Authors: Harold Kerzner

10th Edition

978-047027870, 978-0-470-5038, 470278706, 978-0470278703

Students also viewed these Databases questions