SQL Server updating a time stamp column

后端 未结 5 1564
北荒
北荒 2020-12-03 13:55

In my database I have a timestamp column. I need to update a row in the table and need to update the timestamp column. When I run an update command

5条回答
  •  攒了一身酷
    2020-12-03 14:17

    I had the same problem, my solution:

    UPDATE [table]
    SET [ANY_COLUMN] = [ANY_COLUMN]
    WHERE ID = [ID]
    

    like anytime when a table value change the timestamp is recalculated, I update any column to the same value therefore the timestamp is updated

提交回复
热议问题