Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mysql show database sorted by creation date?

Tags:

mysql

Is there a way to get a list of MySQL databases ordered by creation date or last update date using a command?

like image 966
Rolando Avatar asked Dec 12 '15 04:12

Rolando


1 Answers

Try this , if you want by update date you can order it by update_time

SELECT 
table_schema,
MAX(create_time) create_time,
MAX(update_time) update_time
FROM information_schema.tables
Group by TABLE_SCHEMA
Order by create_time desc
like image 135
Aladin Hdabe Avatar answered Sep 19 '22 16:09

Aladin Hdabe