Course Solutions Uncategorized (Solved) : Apply Trigger Code Provided Column Personperson Table Track Number Modifications Data Colu Q30672932 . . . .

(Solved) : Apply Trigger Code Provided Column Personperson Table Track Number Modifications Data Colu Q30672932 . . . .

 

Apply the trigger code provided below to each column of the”Person.Person” table to track the number of modifications of datafor each column in the table.

Trigger Code: The code below was able to Create the Trigger,however i am unsure of what code i should use to pull the number ofmodifications for each column after the Trigger is created.

CREATE TRIGGER [TRIGGER_ALTER_COUNT] ON Person.Person

FOR INSERT, UPDATE

AS

BEGIN

DECLARE

@TransID nchar(2);

SELECT @TransID = [PersonType] FROM INSERTED i;

UPDATE [PersonType] SET AlterCount = AlterCount + 1, LastUpdate= GETDATE() WHERE Person.Person = @TransID

END

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post