Home > Database > Mysql Tutorial > How to get the creation date of a MySQL table?

How to get the creation date of a MySQL table?

WBOY
Release: 2023-09-03 14:37:06
forward
1528 people have browsed it

How to get the creation date of a MySQL table?

To get the creation date of a MySQL table, use create_time in information_schema.tables. The syntax is as follows -

SELECT create_time FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'yourDatabaseName' AND table_name = 'yourTableName';
Copy after login

My table name is "skiplasttenrecords" and the database is "test".

Implement the above syntax for your database and table names. The query is as follows -

mysql> SELECT create_time FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'test'
   −> AND table_name = 'skiplasttenrecords';
Copy after login

The following is the output showing the creation date -

+---------------------+
| CREATE_TIME         |
+---------------------+
| 2018-11-29 15:47:14 |
+---------------------+
1 row in set (0.00 sec)
Copy after login

The above is the detailed content of How to get the creation date of a MySQL table?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template