Monday, April 30, 2012

How to get Tablewise Rows or Records count in MySQL Database



How to get Tablewise Rows or Records count in MySQL Database following SQL / Query is used

SELECT table_name, table_rows
    FROM INFORMATION_SCHEMA.TABLES
    WHERE TABLE_SCHEMA = 'your_database_Name' ; 


How to get record counts for all tables in MySQL Database

SELECT SUM(TABLE_ROWS) 
    FROM INFORMATION_SCHEMA.TABLES 
    WHERE TABLE_SCHEMA = 'your_database_Name' ; 










No comments: