Skip to main content
added 113 characters in body
Source Link
SELECT update_time FROM information_schema.tables WHERE table_name='yourtablename' 

Or if you want a list of all tables, with last accessed time in order

SELECT table_schema , table_name, update_time as LastAccessed FROM information_schema.tables GROUP BY table_schema ORDER BY update_time ascASC 

For tables weren't used in the last XX hours add WHERE clause

WHERE update_time < 'yyyy-mm-dd' 
SELECT update_time FROM information_schema.tables WHERE table_name='yourtablename' 

Or

SELECT table_schema , table_name, update_time as LastAccessed FROM information_schema.tables GROUP BY table_schema ORDER BY update_time asc 
SELECT update_time FROM information_schema.tables WHERE table_name='yourtablename' 

Or if you want a list of all tables, with last accessed time in order

SELECT table_schema , table_name, update_time as LastAccessed FROM information_schema.tables GROUP BY table_schema ORDER BY update_time ASC 

For tables weren't used in the last XX hours add WHERE clause

WHERE update_time < 'yyyy-mm-dd' 
Source Link

SELECT update_time FROM information_schema.tables WHERE table_name='yourtablename' 

Or

SELECT table_schema , table_name, update_time as LastAccessed FROM information_schema.tables GROUP BY table_schema ORDER BY update_time asc