<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Find Table Rowcount Without Using T-SQL and Without Opening Table</title>
	<atom:link href="http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Wed, 22 May 2013 19:03:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-422140</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 15 Feb 2013 13:45:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-422140</guid>
		<description><![CDATA[select row_number() over (order by col) as rownum , * from talbe]]></description>
		<content:encoded><![CDATA[<p>select row_number() over (order by col) as rownum , * from talbe</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ruksana perveen</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-406947</link>
		<dc:creator><![CDATA[ruksana perveen]]></dc:creator>
		<pubDate>Sat, 12 Jan 2013 14:51:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-406947</guid>
		<description><![CDATA[how to get row number from a  table  please  reply]]></description>
		<content:encoded><![CDATA[<p>how to get row number from a  table  please  reply</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-170615</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Thu, 22 Sep 2011 09:29:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-170615</guid>
		<description><![CDATA[Which version of SQL Server are you using? If you use versions prior to 2005, you need to update the statistics using updateusage command]]></description>
		<content:encoded><![CDATA[<p>Which version of SQL Server are you using? If you use versions prior to 2005, you need to update the statistics using updateusage command</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob WIllsie</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-170008</link>
		<dc:creator><![CDATA[Bob WIllsie]]></dc:creator>
		<pubDate>Tue, 20 Sep 2011 16:38:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-170008</guid>
		<description><![CDATA[Hmm.  I just came across an instance where the storage properties rowcount shows 5,991 rows and a query returned a result set that suggested there were actually 5,993 rows.

So, I ran a query returning just the primary keyset (2 fields make up the primary key) for each row, and it also returns 5,993 rows.]]></description>
		<content:encoded><![CDATA[<p>Hmm.  I just came across an instance where the storage properties rowcount shows 5,991 rows and a query returned a result set that suggested there were actually 5,993 rows.</p>
<p>So, I ran a query returning just the primary keyset (2 fields make up the primary key) for each row, and it also returns 5,993 rows.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kundroo Singh</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-62526</link>
		<dc:creator><![CDATA[Kundroo Singh]]></dc:creator>
		<pubDate>Tue, 09 Mar 2010 14:43:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-62526</guid>
		<description><![CDATA[Hi all,

Please do not ask questions like this or post replies like these.  If you know, then you reply.  It should be authoritive, correct, reliable and functioning.  

Otherwise, what is the meaning of posting each persons views / irritation etc.

This is not a place for fights.  So, please reply only if you understand and know the things.

Ok, now, can anyone tell me how to extract multiple column values from a single table satisfying a particular condition ?  Please help me earliest.  My customer is having problem (errors) in the software I gave him.

K Singh]]></description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>Please do not ask questions like this or post replies like these.  If you know, then you reply.  It should be authoritive, correct, reliable and functioning.  </p>
<p>Otherwise, what is the meaning of posting each persons views / irritation etc.</p>
<p>This is not a place for fights.  So, please reply only if you understand and know the things.</p>
<p>Ok, now, can anyone tell me how to extract multiple column values from a single table satisfying a particular condition ?  Please help me earliest.  My customer is having problem (errors) in the software I gave him.</p>
<p>K Singh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohamed Sheik</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-57200</link>
		<dc:creator><![CDATA[Mohamed Sheik]]></dc:creator>
		<pubDate>Sat, 31 Oct 2009 07:33:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-57200</guid>
		<description><![CDATA[Hello,

Is it possible to get the row count from many (1 to 4) tables
including a condition.
Like For Example I want the number of active employees , active departments (employee count from employeemater table and department  count from departmentmaster table)

This has to be done using simple query. (not more coding required)]]></description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Is it possible to get the row count from many (1 to 4) tables<br />
including a condition.<br />
Like For Example I want the number of active employees , active departments (employee count from employeemater table and department  count from departmentmaster table)</p>
<p>This has to be done using simple query. (not more coding required)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kiran</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-47967</link>
		<dc:creator><![CDATA[Kiran]]></dc:creator>
		<pubDate>Tue, 03 Mar 2009 19:39:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-47967</guid>
		<description><![CDATA[Hi,

Pinal, how to know the date time, the record inserted into table or record modified. 
Table doesn&#039;t have column - datetime.

please any one can help me

Thanks
Kiran]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Pinal, how to know the date time, the record inserted into table or record modified.<br />
Table doesn&#8217;t have column &#8211; datetime.</p>
<p>please any one can help me</p>
<p>Thanks<br />
Kiran</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - Find Number of Rows and Disk Space Reserved - Using sp_spaceused Interesting Observation Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-45594</link>
		<dc:creator><![CDATA[SQL SERVER - Find Number of Rows and Disk Space Reserved - Using sp_spaceused Interesting Observation Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Wed, 14 Jan 2009 01:30:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-45594</guid>
		<description><![CDATA[[...] 14, 2009 by pinaldave    Previously I posted SQL SERVER - Find Row Count in Table - Find Largest Table in Database - T-SQL. Today we will look into the same issue but with some additional interesting detail. We can find [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 14, 2009 by pinaldave    Previously I posted SQL SERVER &#8211; Find Row Count in Table &#8211; Find Largest Table in Database &#8211; T-SQL. Today we will look into the same issue but with some additional interesting detail. We can find [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: twister</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-44731</link>
		<dc:creator><![CDATA[twister]]></dc:creator>
		<pubDate>Thu, 11 Dec 2008 16:29:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-44731</guid>
		<description><![CDATA[Pinal, the answer you suggest for your interview question is not correct just because any other &quot;DB Administration&quot; frontend could do the same (correct answer doesn&#039;t restrict to MS SQL.....Studio) and because you didn&#039;t specified a specific platform or software vendor.  The question is wornly constructed, and multiple correct answers can fit.....including some answers that you&#039;d mark as wrong.

To get the correct answer you have to make the correct question.]]></description>
		<content:encoded><![CDATA[<p>Pinal, the answer you suggest for your interview question is not correct just because any other &#8220;DB Administration&#8221; frontend could do the same (correct answer doesn&#8217;t restrict to MS SQL&#8230;..Studio) and because you didn&#8217;t specified a specific platform or software vendor.  The question is wornly constructed, and multiple correct answers can fit&#8230;..including some answers that you&#8217;d mark as wrong.</p>
<p>To get the correct answer you have to make the correct question.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Theresa</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-44705</link>
		<dc:creator><![CDATA[Theresa]]></dc:creator>
		<pubDate>Thu, 11 Dec 2008 00:12:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-44705</guid>
		<description><![CDATA[You can also use the standard reports (In 2008 SSMS, right click database - Reports - Standard Reports - Disk Usage by Table). The second column give the # Records for each table in the database.]]></description>
		<content:encoded><![CDATA[<p>You can also use the standard reports (In 2008 SSMS, right click database &#8211; Reports &#8211; Standard Reports &#8211; Disk Usage by Table). The second column give the # Records for each table in the database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HG Humphrey</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-44664</link>
		<dc:creator><![CDATA[HG Humphrey]]></dc:creator>
		<pubDate>Tue, 09 Dec 2008 22:05:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-44664</guid>
		<description><![CDATA[Pinal--

If it were me, and I were interviewing prospective DBA&#039;s, I would prefer they know more about querying the data than using the GUI.  A better question would have been can you tell me which table (if SQL 2000) or which DMV (SQL 2005 or 2008) contains the row count displayed in the GUI.

Anybody can learn the GUI, but a real DBA knows how to get along without it.

Just my thoughts.

HGH]]></description>
		<content:encoded><![CDATA[<p>Pinal&#8211;</p>
<p>If it were me, and I were interviewing prospective DBA&#8217;s, I would prefer they know more about querying the data than using the GUI.  A better question would have been can you tell me which table (if SQL 2000) or which DMV (SQL 2005 or 2008) contains the row count displayed in the GUI.</p>
<p>Anybody can learn the GUI, but a real DBA knows how to get along without it.</p>
<p>Just my thoughts.</p>
<p>HGH</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-44660</link>
		<dc:creator><![CDATA[Anthony]]></dc:creator>
		<pubDate>Tue, 09 Dec 2008 20:50:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-44660</guid>
		<description><![CDATA[You can use the powershell version against sql 2005 or sql 2008 servers (I havent tried it with sql 2000 but it should work)
You can even use it without a full sql 2008 install by using the powershell components from  http://www.microsoft.com/downloads/details.aspx?FamilyId=228DE03F-3B5A-428A-923F-58A033D316E1&amp;displaylang=en]]></description>
		<content:encoded><![CDATA[<p>You can use the powershell version against sql 2005 or sql 2008 servers (I havent tried it with sql 2000 but it should work)<br />
You can even use it without a full sql 2008 install by using the powershell components from  <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=228DE03F-3B5A-428A-923F-58A033D316E1&#038;displaylang=en" rel="nofollow">http://www.microsoft.com/downloads/details.aspx?FamilyId=228DE03F-3B5A-428A-923F-58A033D316E1&#038;displaylang=en</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerry Hung</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-44657</link>
		<dc:creator><![CDATA[Jerry Hung]]></dc:creator>
		<pubDate>Tue, 09 Dec 2008 19:00:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-44657</guid>
		<description><![CDATA[One day we&#039;ll realize we cannot survive without SSMS :)

2 ways I think of

1) sysindexes (may not be accurate)
SELECT
		OBJECT_NAME(sysindexes.id) TableName
		,ROWS
FROM  sysindexes

2) In 2008 SSMS, add in the column &quot;Row Count&quot; for the Tables 

but to get most accurate count, I&#039;d still use
SELECT COUNT(1) FROM Table (nolock)]]></description>
		<content:encoded><![CDATA[<p>One day we&#8217;ll realize we cannot survive without SSMS :)</p>
<p>2 ways I think of</p>
<p>1) sysindexes (may not be accurate)<br />
SELECT<br />
		OBJECT_NAME(sysindexes.id) TableName<br />
		,ROWS<br />
FROM  sysindexes</p>
<p>2) In 2008 SSMS, add in the column &#8220;Row Count&#8221; for the Tables </p>
<p>but to get most accurate count, I&#8217;d still use<br />
SELECT COUNT(1) FROM Table (nolock)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nasif</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-44656</link>
		<dc:creator><![CDATA[Nasif]]></dc:creator>
		<pubDate>Tue, 09 Dec 2008 18:46:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-44656</guid>
		<description><![CDATA[Thanks for the Info...:D]]></description>
		<content:encoded><![CDATA[<p>Thanks for the Info&#8230;:D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Artem</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-44652</link>
		<dc:creator><![CDATA[Artem]]></dc:creator>
		<pubDate>Tue, 09 Dec 2008 15:06:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-44652</guid>
		<description><![CDATA[I believe this option is only available in SQL 2008 and only in 2008 compatibility mode.]]></description>
		<content:encoded><![CDATA[<p>I believe this option is only available in SQL 2008 and only in 2008 compatibility mode.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-44646</link>
		<dc:creator><![CDATA[Anthony]]></dc:creator>
		<pubDate>Tue, 09 Dec 2008 13:32:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-44646</guid>
		<description><![CDATA[There is another way that doesnt involve management studio or t-sql.
You can use the powershell provider for sql

(get-item SQLSERVER:\sql\dbserver\default\Databases\user_database\Tables\dbo.user_table).rowcount

gets the rowcount for table called user_table in database user_database on server dbserver

I know this was an interview question to find out what people know, but when would you ever need to find out the rowcount of a table without using t-sql?]]></description>
		<content:encoded><![CDATA[<p>There is another way that doesnt involve management studio or t-sql.<br />
You can use the powershell provider for sql</p>
<p>(get-item SQLSERVER:\sql\dbserver\default\Databases\user_database\Tables\dbo.user_table).rowcount</p>
<p>gets the rowcount for table called user_table in database user_database on server dbserver</p>
<p>I know this was an interview question to find out what people know, but when would you ever need to find out the rowcount of a table without using t-sql?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-44625</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Tue, 09 Dec 2008 03:10:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-44625</guid>
		<description><![CDATA[Imran I liked your input. I will write separate post about this.

Regards,
Pinal]]></description>
		<content:encoded><![CDATA[<p>Imran I liked your input. I will write separate post about this.</p>
<p>Regards,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran Mohammed</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-44624</link>
		<dc:creator><![CDATA[Imran Mohammed]]></dc:creator>
		<pubDate>Tue, 09 Dec 2008 03:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-44624</guid>
		<description><![CDATA[Hello,

Few cents from my side...

--This is fastest amoung all, output includes some good information including row count information.
select sp_spaceused [table_name]

-- If you just want rowcount for all tables/single table in a database,
-- for all tables
Select A.name &#039;TableName&#039; , B.rowcnt &#039;RowCount&#039; from sysobjects  A, sysindexes B where A.id =b.id and A.type = &#039;u&#039; and indid &lt;2

-- for single table
Select A.name &#039;TableName&#039; , B.rowcnt &#039;RowCount&#039; from sysobjects  A, sysindexes B where A.id =b.id and indid &lt;2 and A.name = table_name 

-- The poorest among all. If we have a exclusive lock on that table, this query will be running for ever.
select count(*) from table_name

Thanks,
IM.]]></description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Few cents from my side&#8230;</p>
<p>&#8211;This is fastest amoung all, output includes some good information including row count information.<br />
select sp_spaceused [table_name]</p>
<p>&#8211; If you just want rowcount for all tables/single table in a database,<br />
&#8211; for all tables<br />
Select A.name &#8216;TableName&#8217; , B.rowcnt &#8216;RowCount&#8217; from sysobjects  A, sysindexes B where A.id =b.id and A.type = &#8216;u&#8217; and indid &lt;2</p>
<p>&#8211; for single table<br />
Select A.name &#8216;TableName&#8217; , B.rowcnt &#8216;RowCount&#8217; from sysobjects  A, sysindexes B where A.id =b.id and indid &lt;2 and A.name = table_name </p>
<p>&#8211; The poorest among all. If we have a exclusive lock on that table, this query will be running for ever.<br />
select count(*) from table_name</p>
<p>Thanks,<br />
IM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tok</title>
		<link>http://blog.sqlauthority.com/2008/12/09/sql-server-find-table-rowcount-without-using-t-sql-and-without-opening-table/#comment-44623</link>
		<dc:creator><![CDATA[Tok]]></dc:creator>
		<pubDate>Tue, 09 Dec 2008 02:44:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=1635#comment-44623</guid>
		<description><![CDATA[Hmmm ... I&#039;d argue that &quot;SELECT COUNT(*) FROM TABLE&quot; isn&#039;t actually T-SQL, and therefore is a valid answer ... I&#039;d consider that ANSI SQL.  Nothing in that statement ties it to Transaction-SQL specifically.

That aside, as a developer I would have felt compelled to point out a couple of lines of .NET code that could have accessed the DataTable.Rows.Count object as well...  either that, or go through SMO.  Whether you&#039;d class that as &quot;opening&quot; the table, compared to whatever Management Studio is doing in the background in order to get that RowCount ...

Easy to get caught up in the semantics, methinks :-D

Pinal, question for you: *is* Management Studio &quot;opening&quot; the table in the background to get this figure on-demand?  Or is the figure a running count that&#039;s stored separately, and updated live whenever the table is updated?

If it&#039;s on-demand, I&#039;d argue that Management Studio is still &quot;opening&quot; the table, in order to get that figure...]]></description>
		<content:encoded><![CDATA[<p>Hmmm &#8230; I&#8217;d argue that &#8220;SELECT COUNT(*) FROM TABLE&#8221; isn&#8217;t actually T-SQL, and therefore is a valid answer &#8230; I&#8217;d consider that ANSI SQL.  Nothing in that statement ties it to Transaction-SQL specifically.</p>
<p>That aside, as a developer I would have felt compelled to point out a couple of lines of .NET code that could have accessed the DataTable.Rows.Count object as well&#8230;  either that, or go through SMO.  Whether you&#8217;d class that as &#8220;opening&#8221; the table, compared to whatever Management Studio is doing in the background in order to get that RowCount &#8230;</p>
<p>Easy to get caught up in the semantics, methinks :-D</p>
<p>Pinal, question for you: *is* Management Studio &#8220;opening&#8221; the table in the background to get this figure on-demand?  Or is the figure a running count that&#8217;s stored separately, and updated live whenever the table is updated?</p>
<p>If it&#8217;s on-demand, I&#8217;d argue that Management Studio is still &#8220;opening&#8221; the table, in order to get that figure&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
