Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a trigger to do the following: AFTER the value in the ‘REGION’ column of

ID: 3772405 • Letter: C

Question

Create a trigger to do the following:

AFTER the value in the ‘REGION’ column of the ‘SALES’ table is updated the trigger must add an audit record to the SALES_AUDIT table indicating that a SALES record update happened.

Create the SALES_AUDIT Table as follows

CREATE TABLE SALES_AUDIT (AUDIT_TIMESTAMP TIMESTAMP NOT NULL PRIMARY KEY);

Update 1 of the existing records in the SALES table to have a different value in the ‘REGION’ column.

I also need you issue the 2 commands:

SELECT * FROM SALES;

SELECT * FROM SALES_AUDIT;

after your create trigger, and run the update statement.

piece from SALES Table there are actually 42 rows in this table:

SALES DATE 2006-03-29 2006-03-29 2006-03-29 1996-03-29 2006-03-29 2006-03-29 2006-03-29 2006-03-29 2006-03-29 2006-03-30 2006-03-30 SALES_PERSON LUCCHESSI LUCCHESSI LEE LEE LEE LEE GOUNOT GOUNOT GOUNOT LUCCHESSI LUCCHESSI REGION string Ontario-South 3 Quebec Ontario-South 2 Ontario-North 2 Quebec Manitoba Ontario-South 3 Quebec Manitoba Ontario-South 1 Quebec SALES Date Time Int32

Explanation / Answer

Trigger code....

CREATE or REPLACE TRIGGER After_Region_SALES
AFTER
UPDATE [of Region ]
ON SALES
BEGIN
INSERT INTO SALES_AUDIT  Values(' SALES record update happened ', sysdate);
End;

i was run this code .....

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote