How would I do this in a stored procedure?
SELECT COUNT (*), TableName
FROM DATABASE LotsOfTables.MDF
I have a database that I'm reviewing that has about 400 tables, but my guess is 20 are used, LOL. I'd like to use Query Analyzer to get the TableName and Count. Thanks