Your assignment is to create an auditing policy that keep track of insertion and
ID: 640784 • Letter: Y
Question
Your assignment is to create an auditing policy that keep track of insertion and update activities of Customers table. This Customers trigger fires before update or insert or delete on customers. You have to test your trigger and provide screenshots to prove that it works correctly
D1. Create a new table named Customers. The new table should have at least 5 columns including a primary key. (Cust-id, First_name, Last_name, State, Zip-code. Use cust_id as PK.
D2. Insert 2 rows into the Customers table.
D3. Create a history table for Customers table, (create table customers_history). The table should have same structure as Customers table Cust-id + First_name + Last_name+ State + Zip_code. Don
Explanation / Answer
3. create table customers_history
HistoryId int(8),
custId int(5) ,
First_Name varchar(25),
Last_Name varchar(25),
State varchar(10),
zip_code int(6),
Primary Key (HistoryId)
);
4. create trigger audit_customers
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.