Live Brilliant

[Mysql] db테이블 리스트 및 최근 업데이트 테이블순 본문

개발은 핵찜이야/DATABASE

[Mysql] db테이블 리스트 및 최근 업데이트 테이블순

주인정 2018. 6. 25. 14:53

*최근 업데이트된 테이블순으로 리스트 

1. 테이블 리스트 출력

show tables;


2. 테이블명과 업데이트 일시 

SELECT 

table_name ,

table_rows,

UPDATE_TIME,

    round(data_length/(1024*1024),2) as 'DATA_SIZE(MB)',

    round(index_length/(1024*1024),2) as 'INDEX_SIZE(MB)'

FROM   information_schema.tables

WHERE  TABLE_SCHEMA = 'table명'

order by update_time desc


Comments