In my Database i have a table with column
`LastUpdated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
i would like to Touch a record in that table so that LastUpdated column will be automatically updated but i don't want to change any value in that row.
Is that possible?
Thank you.
解决方案
AFAIK, You don't have options to use touch to update mysql table records like you touch file in unix systems. You have to issue an update query to update the timestamp in the LastUpdated column .
UPDATE mytable SET LastUpdated=NOW() WHERE ...