Is there a quick and easy way to have a datetime column in a table that will catch 'lastupdated' date and time. I can do this for 'inserted'/'created' by having a datetime column with a default value of getdate(), but is there a trick to do the same for updated.
( test vachar(1),
created_date datetime default getdate(),
and have 'updated_date' column updated each time an update is made to the table.
I presume I require an update trigger, but how do I populate the updated_date column within the update trigger- any thoughts. Or is there another way.
Please no-one mention timestamp - I know all about that and it doesnt do what it says on the tin