I have a table like:
id | NODE_ID | last_updated
1 | 4 | 11-29-2010 ...
where the last_updated column is set to update after any change to the row using "on update CURRENT_TIMESTAMP"
I need to update all of the records with a NODE_ID of 4 to 5, but I want to leave the timestamp unchanged.
I'm thinking to do an update and reference the currently selected row in the query to manually set the timestamp...confusing...like this
update jobs set NODE_ID=4, last_updated = this.last_updated where NODE_ID = 5;
What can I use to replace the "this" in the query? If I can't, then whats the best way to do this sort of thing?
~Sean
PS. mysql Ver 14.12 Distrib 5.0.86, for redhat-linux-gnu (i686) using readline 5.1