How can I tell when a MySQL table was last updated?

后端 未结 16 1678
忘了有多久
忘了有多久 2020-11-22 17:17

In the footer of my page, I would like to add something like \"last updated the xx/xx/200x\" with this date being the last time a certain mySQL table has been updated.

16条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 17:54

    For a list of recent table changes use this:

    SELECT UPDATE_TIME, TABLE_SCHEMA, TABLE_NAME
    FROM information_schema.tables
    ORDER BY UPDATE_TIME DESC, TABLE_SCHEMA, TABLE_NAME
    

提交回复
热议问题