please help me,
I had created a table,
CREATE TABLE THETABLE
(
id_num int IDENTITY(1,1),
DT datetime,
NM varchar(30)
)
and then created a trigger on this table
CREATE TRIGGER myTRIGGER on THETABLE
INSTEAD OF UPDATE
AS
UPDATE THETABLE
SET
DT = GETDATE(),
NM = COALESCE(inserted.NM, USER)
FROM inserted
WHERE THETABLE.ID = inserted.ID
GO
But,I got the error while creating the trigger like this
Server: Msg 170, Level 15, State 1, Procedure myTRIGGER, Line 2
Line 2: Incorrect syntax near 'INSTEAD'.
please give me a solution