简体   繁体   中英

MySql - How to get datetime of last ALTER TABLE?

I'm looking for a way to get datetime of last ALTER TABLE (structure edit) of a table. I'm currently using MySql 5.6. Checking information_schema db I can get only the last generic edit of the table (INSERT, UPDATE, etc.). Thanks in advance.

Try this

SELECT 
    create_time
FROM
    INFORMATION_SCHEMA.TABLES
WHERE
    table_schema = 'databasename'
        AND table_name = 'tablename';

Above query gives the last table structure edited datetime.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM