« Home | Svn branching strategies. » | Excellent tutorial on linux usermanagement and sud... » | Using Grep to search in files » | Android implicit intents various intents creation ... » | Find the unused selectors in a webpage. » | Installing missing dependencies redhat / fedora / ... » | Query to delete rows with duplicate columns. » | Mysql do bulk operations on tables, columns, infor... » | Joomla templating tutorials. » | Google Trends / Result count, of programming langu... » 

Wednesday, January 19, 2011 

Find tables which are empty in database.

Find tables which are empty in database use the following query

SELECT `TABLE_NAME` FROM `TABLES` where `TABLE_SCHEMA` = '<your db schema name>' and `TABLE_ROWS` = 0 or `TABLE_ROWS` is null;

Find tables which have MyISAM engine in database use the following query.

SELECT `TABLE_NAME`,`ENGINE` FROM `TABLES` where `TABLE_SCHEMA` = '<your db schema name>' and `ENGINE` = 'MyISAM'