How to get MySQL table creation date?

I was wondering if it is possible to get the creation date of a particular table in the database. My employer would like to add this feature, and I could not find a solution with Google.

I realized that SO is the best place to watch.

+49
sql database mysql sql-server
Aug 08 2018-12-12T00:
source share
2 answers

You requested information_schema for the create_time table.

For example:

 SELECT create_time FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'your_schema' AND table_name = 'your_table' 

Link : http://dev.mysql.com/doc/refman/5.0/en/tables-table.html

+79
Aug 08 2018-12-12T00:
source share

I know this is an old question, but I wanted to offer an alternative approach that does not involve directly querying the information_schema tables for those who are looking for this question later for reference.

You can get information about tables using "show table status". This gives you a lot of information, including the storage mechanism used, creation time, update time, and row count.

You can filter the results based on the table name, as shown below:

 show table status where name = 'your-table-name' 
+23
May 21 '13 at 7:11
source share



All Articles