I am using rowcnt column in sysindexes to report some database statistics.
I used the "max" to get a valid row count (as I found multiple records for many tables) for each table, and added status<>0 in the conditions to get valid results.
All went OK except for some rare cases where empty tables seem to have "old" row count still stuck in the column !!
must I update database statistics using dbcc something !? or is there an additional condition for selecting from sysindexes !?

thanks,

I think you should use count() .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.