logo

Crowdly

Browser

Add to Chrome

CREATE TRIGGER Products_Update ON Products FOR UPDATE AS INSERT INTO PriceTracki...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

CREATE TRIGGER Products_Update

ON Products

FOR UPDATE

AS

INSERT INTO PriceTracking(ProductID, Time, OldPrice, NewPrice)

SELECT I.ProductID, GETDATE(), D.UnitPrice, I.UnitPrice

FROM Inserted I

INNER JOIN Deleted D

ON I.ProductID = D.ProductID

AND I.UnitPrice <> D.UnitPrice;

What is the purpose of this trigger?

100%
0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.usth.edu.vn?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome