SQL Server updating a time stamp column
sql, sql-server
Solution
You don't
The timestamp column is updated automatically. Perhaps you are under the impression that timestamp contains a value relating to the time? It doesn't, but simply is a number which is updated whenever a value in that record is. Think of it like a row version number.
From MSDN:
The timestamp data type is just an incrementing number and does not preserve a date or a time.
Problem
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 I get: ``` Cannot update a timestamp column. ``` How can I update the timestamp column?