Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Mark
»
Get record count for every table in a DB (1...
Get record count for every table in a DB (1 Step)
Rate Topic
Display Mode
Topic Options
Author
Message
Mark-443607
Mark-443607
Posted Saturday, September 22, 2007 1:07 PM
Grasshopper
Group: General Forum Members
Last Login: Tuesday, October 09, 2012 4:20 AM
Points: 14,
Visits: 80
Comments posted to this topic are about the item
Get record count for every table in a DB (1 Step)
Post #401458
kylroa
kylroa
Posted Thursday, November 29, 2007 8:03 AM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, November 29, 2007 7:58 AM
Points: 1,
Visits: 0
cool...
SELECT o.name TableName ,i.rows TblRowCount
FROM sysobjects o
INNER JOIN sysindexes i ON (o.id = i.id)
WHERE o.xtype = 'u'
AND i.indid < 2
order by TblRowCount desc
Post #427490
Jeff Moden
Jeff Moden
Posted Thursday, November 29, 2007 9:41 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 7:51 PM
Points: 32,910,
Visits: 26,800
Better think about DBCC UPDATEUSAGE once in a while....
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #427909
srihari nandamuri
srihari nandamuri
Posted Monday, January 26, 2009 9:57 AM
SSC Veteran
Group: General Forum Members
Last Login: Thursday, April 19, 2012 6:44 AM
Points: 273,
Visits: 56
Below is the best in sql2005
SELECT object_name(object_id) 'Table_Name', SUM(row_count) 'Total_Rows'
FROM sys.dm_db_partition_stats where index_id <2 GROUP BY object_name(object_id)
ORDER BY object_name(object_id)
Comments please....
Srihari Nandamuri
Post #643544
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.