Database Solutions
Friday, March 11, 2011
Count of each table in database
the query below will generate sql statements to count number of rows in each table on the database.
SELECT 'select '''+ name + ''', count(*) from [' + name + '] union'
FROM Sysobjects
WHERE Type='U'
ORDER BY 1;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment