问题
Is it possible to get last updated time and date of the row using MYSQL server.
回答1:
Well there is no inbuild feature exists with MySQL. Though you can get the same effect by adding a timestamp column:
ALTER TABLE NAMEYOURTABLE
ADD COLUMN last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
using above to create timestamp with name last_update column will make it pretty much automatically managed and updated. Now you can select from NAMEYOURTABLE the last updated row based on the timestamp.
来源:https://stackoverflow.com/questions/11505834/is-it-possible-to-get-last-update-time-of-the-row-in-sql