美文网首页
mysql中查询所有表得创建时间、修改时间、引擎、数据量的sql

mysql中查询所有表得创建时间、修改时间、引擎、数据量的sql

作者: rightchen | 来源:发表于2019-01-15 12:03 被阅读0次

    select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'DB_NAME' order by create_time desc;

    可查询DB_NAME库下所有数据表的创建时间,可按照创建时间倒叙排序。

    mysql-> select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'DB_NAME' order by create_time desc\G;
    *************************** 1. row ***************************
      TABLE_CATALOG: def
       TABLE_SCHEMA: dn_name
         TABLE_NAME: be_channel_report
         TABLE_TYPE: BASE TABLE
             ENGINE: MyISAM
            VERSION: 10
         ROW_FORMAT: Dynamic
         TABLE_ROWS: 758
     AVG_ROW_LENGTH: 39
        DATA_LENGTH: 29680
    MAX_DATA_LENGTH: 281474976710655
       INDEX_LENGTH: 16384
          DATA_FREE: 0
     AUTO_INCREMENT: 213516
        CREATE_TIME: 2018-03-22 13:40:32
        UPDATE_TIME: 2018-08-15 18:10:02
         CHECK_TIME: NULL
    TABLE_COLLATION: utf8_general_ci
           CHECKSUM: NULL
     CREATE_OPTIONS: 
      TABLE_COMMENT: ***
    
    

    相关文章

      网友评论

          本文标题:mysql中查询所有表得创建时间、修改时间、引擎、数据量的sql

          本文链接:https://www.haomeiwen.com/subject/hjoedqtx.html