This stored procedure will list all user tables in the current database, along with the number of rows in the table.
This version uses dynamic SQL to retrieve the number of rows, to overcome the need for an index on all tables.
I use this to document legacy databases, I find that they may have tables w/o PK, FK, or any Indices. The variants of this sp that use sysindexes table will not report a row count in this situation.
SP that shows information from a given database
It is used to show information from a database. It shows the creation date, it calculates the time in days, months and hours since its creation and it shows all the users with rights in that database.
2002-01-27
2,169 reads