Is there a way of stopping DEFAULT TIMESTAMP columns from updating the timestamp when you perform an UPDATE statement?
We need to run an update statement on a table to fix up some data, however we don't want that update to be reflected by the UpdatedAt default timestamp column.
asked 07 Mar '12, 17:53
You can just include the column with a value in your update statement:
Update table set UpdatedAt ='2012-01-01'
Will change the value to the 1st January...
you can even do something like this:
Update table set UpdatedAt = UpdatedAt, ...
This will leave the value as before