要获取 mysql 表的创建日期,请使用 information_schema.tables 中的 create_time。语法如下 -
select create_time from information_schema.tables where table_schema = 'yourdatabasename' and table_name = 'yourtablename';
我的表名称是“skiplasttenrecords”,数据库是“test”。
为您的数据库和表名称实现上述语法。查询如下 -
mysql> select create_time from information_schema.tables where table_schema = 'test' −> and table_name = 'skiplasttenrecords';
以下是显示创建日期的输出 -
+---------------------+| create_time |+---------------------+| 2018-11-29 15:47:14 |+---------------------+1 row in set (0.00 sec)
以上就是如何获取mysql表的创建日期?的详细内容。