>>>Is there a SQL command I can use to get a list of all the tables along with the number of records in each table in a database?
>>>
>>>Thanks,
>>>Einar
>>
>>
select rowcnt,object_name(id)
>>from sysindexes
>>where indid < 2 and object_name(id) not like 'sys%'
Cetin
>
>
>Thanks Cetin. I already awarded the solution stars but a single star is comming your way. Your way is a lot less "code"
>
>Thanks,
>Einar
Einar,
I don't care about the stars:) I posted this one because this one directly uses the sysindexes table to get the rowcounts;) I remember this tricky one from "Inside SQL server 7.0" - MSPress. It is not only less code, it is fastest I have seen.
Cetin