I am sure there are better ways of doing this. Heres a quick and dirty way.
select 'select ''' + TABLE_NAME + ''', count(*) from ' + table_name from information_schema.tables
(1) Run this query in Query Analyzer
(2) This will generate the queries, Copy the output
(3) Paste the output in Query analyzer and run it
John
www.ideo.com
-----Original Message-----
From: Sultana, Naheed [mailto:naheed.[Email Address Removed] November 26, 2002 10:31 AM
To: LazyDBA.com Discussion
Subject: Need Help with Script!
Hi List,
I need a script which can return the Row Count for all the tables I have .If
it's handy with anyone of you, pls forward me.
TIA
MS Sql Server LazyDBA home page