阅读背景:

即使没有更改,MYSQL timestamp列也会自动更新?

来源:互联网 

I have a column update_date in a table and type is timestamp. I set the deault value by using phpmyadmin drop down menu to CURRENT_TIMESTAMP. But later when ever I run sql UPDATE x SET ... it updates the timestamp column if only there is a changes in any of the columns. What I would like to achieve is that whether there is a change or not set the current time everytime the update sql runs. Is there any way of doing it in the mysql or I need to set the update_date explicitly every time the update is called? I have a column update_date in a table and type




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: