Hi, just 2 only yesterday I start using Trigger.
I have 2 tables:
tblAmendment
------------
PageId
actiontime
tblTest
----
pageId
tester
I want if any update on tblTest then we record down which record updated on tblAmendment and action time. So I create this trigger on tblTest.
CREATE TRIGGER trgAmendment ON dbo.tblTest
FOR UPDATE AS
BEGIN
INSERT INTO dbo.tblAmendment
(pageId, actiontime)
VALUES (???????, CurrentTime())
END
How to pass pageId value from tblTest to tblAmendment?
Thank you very much, have a nice day.....
Martin
I have 2 tables:
tblAmendment
------------
PageId
actiontime
tblTest
----
pageId
tester
I want if any update on tblTest then we record down which record updated on tblAmendment and action time. So I create this trigger on tblTest.
CREATE TRIGGER trgAmendment ON dbo.tblTest
FOR UPDATE AS
BEGIN
INSERT INTO dbo.tblAmendment
(pageId, actiontime)
VALUES (???????, CurrentTime())
END
How to pass pageId value from tblTest to tblAmendment?
Thank you very much, have a nice day.....
Martin