Click here to Skip to main content
15,907,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to update a null column using trigger after insert?
Posted

Something like this should help get you started:

SQL
CREATE TRIGGER trig_InsertExample
ON [TestTable]
FOR INSERT
AS
Begin
    Insert into TestTable (Col1, Col2) 
    Select t.SomeOtherValue, null 
    from Inserted i
    Left Join TestTable t
    on i.ID = t.ID;
End
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900