Question: CREATE TABLE Customers ( Cust_id int PRIMARY KEY, Last_Name varchar(255), First_Name varchar(255), State varchar(255), Zipcode Number(10) ); CREATE TABLE Customers_history ( History_id int PRIMARY KEY,

CREATE TABLE Customers ( Cust_id int PRIMARY KEY, Last_Name varchar(255), First_Name varchar(255), State varchar(255), Zipcode Number(10) );

CREATE TABLE Customers_history ( History_id int PRIMARY KEY, Cust_id int, Last_Name varchar(255), First_Name varchar(255), State varchar(255), Zipcode Number(10) );

D4. Create a trigger for auditingcreate trigger audit_customers on the Custoners table

D5. Insert 3 records into the Customers table.

D4. Retrieve all rows from customers and customers-history table to verify that rows were added to the Customers table and that the trigger is populating the customers-history table.

D5. Now update the zip code of one customer and check if rows were added to the customers table and that the trigger did populate the customers-history table with the new zip code.

D6. Update the first record of Customers, and then delete this record.

D7. Display the content of Customers table and the history table.

ONLY DO IN ORACLE SQL USING TABLES PROVIDED.

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!