Search this blog

Monday, August 10, 2009

Find All Tables and its Count from a Database

The Following Query Helps you to list out all the table available in a database along with it’s(table’s) count

select object_name(id) as Table_Name, rowcnt as Rows_count

from sysindexes WHERE id in (select OBJECT_ID(table_name) from information_schema.tables) AND

indid < 2


Have a look at the sample result of this Query:

No comments:

Post a Comment