r34627673
r34627673

Reputation: 323

How to insert creation date of some tables into a new table?

I have table like this:

enter image description here

I manually insert generatedtime by selecting the date on that table, but all I need right now that I need to get the generated time from this:

enter image description here

What may I do to get the creation date so that the creation date can be inputted into a table? Thanks in advance

PS: I know that the creation time of table can be shown in information_schema. But Is there any way to input the creation time into a new table? The example of the result is like this ibb.co/gO5xNa

Upvotes: 0

Views: 197

Answers (4)

Alexander Oleynik
Alexander Oleynik

Reputation: 106

Have you tried look at CREATE_TIME field into INFORMATION_SCHEMA.TABLES?

Upvotes: 0

Morten Bork
Morten Bork

Reputation: 1632

This link shows you a halfway duplicate of your question

Combine this with an update or insert, and you will be able to do what you want.

Upvotes: 0

Neha
Neha

Reputation: 197

Get that information from Information_SChema.tables

https://dev.mysql.com/doc/refman/5.7/en/tables-table.html

Upvotes: 0

A C
A C

Reputation: 705

You should be able to get this information from the CREATE_TIME column in INFORMATION_SCHEMA.TABLES

Example:

SELECT TABLE_NAME, CREATE_TIME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'yourSchema'
;

Upvotes: 1

Related Questions