CREATE TABLE TestGETDATE (
[ID] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
[Value] VARCHAR (50) NULL,
[Data_create] DATETIME NULL DEFAULT GETDATE(),
[Updated_at] DATETIME NULL)
GO
CREATE OR ALTER TRIGGER TestGETDATEUpdate ON TestGETDATE FOR UPDATE AS
BEGIN
UPDATE TestGETDATE
SET Updated_at = GETDATE()
WHERE ID IN ( SELECT ID FROM Inserted )
END
GO