<?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; Query to Find Seed Values, Increment Values and Current Identity Column value of the table</title>
	<atom:link href="http://blog.sqlauthority.com/2007/04/23/sql-server-query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/04/23/sql-server-query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 09 Feb 2012 19:36:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Virginia</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-149757</link>
		<dc:creator><![CDATA[Virginia]]></dc:creator>
		<pubDate>Thu, 21 Jul 2011 09:38:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-149757</guid>
		<description><![CDATA[Nice, that what exactly what I was looking for!!!]]></description>
		<content:encoded><![CDATA[<p>Nice, that what exactly what I was looking for!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank Cardona</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-129994</link>
		<dc:creator><![CDATA[Frank Cardona]]></dc:creator>
		<pubDate>Tue, 19 Apr 2011 16:48:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-129994</guid>
		<description><![CDATA[Use it like this:
DBCC CHECKIDENT( your_table_name, RESEED, new_value )

new_value = 0 so de identity starts fresh]]></description>
		<content:encoded><![CDATA[<p>Use it like this:<br />
DBCC CHECKIDENT( your_table_name, RESEED, new_value )</p>
<p>new_value = 0 so de identity starts fresh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Russell</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-128710</link>
		<dc:creator><![CDATA[Eric Russell]]></dc:creator>
		<pubDate>Wed, 13 Apr 2011 18:30:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-128710</guid>
		<description><![CDATA[Hi Pinal,
I just tried you query and discovered that the OBJECT_ID(), IDENT_SEED(), IDENT_INCR(), and IDENT_CURRENT() functions require the table name be prefixed with schema name, if the schema is something other than the default DBO. This modified query below now works for tables contained in a user defined schema.

SELECT IDENT_SEED(TABLE_SCHEMA+&#039;.&#039;+TABLE_NAME) AS Seed,
IDENT_INCR(TABLE_SCHEMA+&#039;.&#039;+TABLE_NAME) AS Increment,
IDENT_CURRENT(TABLE_SCHEMA+&#039;.&#039;+TABLE_NAME) AS Current_Identity,
TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE OBJECTPROPERTY(OBJECT_ID(TABLE_SCHEMA+&#039;.&#039;+TABLE_NAME), &#039;TableHasIdentity&#039;) = 1
AND TABLE_TYPE = &#039;BASE TABLE&#039;;]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,<br />
I just tried you query and discovered that the OBJECT_ID(), IDENT_SEED(), IDENT_INCR(), and IDENT_CURRENT() functions require the table name be prefixed with schema name, if the schema is something other than the default DBO. This modified query below now works for tables contained in a user defined schema.</p>
<p>SELECT IDENT_SEED(TABLE_SCHEMA+&#8217;.'+TABLE_NAME) AS Seed,<br />
IDENT_INCR(TABLE_SCHEMA+&#8217;.'+TABLE_NAME) AS Increment,<br />
IDENT_CURRENT(TABLE_SCHEMA+&#8217;.'+TABLE_NAME) AS Current_Identity,<br />
TABLE_NAME<br />
FROM INFORMATION_SCHEMA.TABLES<br />
WHERE OBJECTPROPERTY(OBJECT_ID(TABLE_SCHEMA+&#8217;.'+TABLE_NAME), &#8216;TableHasIdentity&#8217;) = 1<br />
AND TABLE_TYPE = &#8216;BASE TABLE&#8217;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jignesh</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-46740</link>
		<dc:creator><![CDATA[Jignesh]]></dc:creator>
		<pubDate>Mon, 16 Feb 2009 16:00:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-46740</guid>
		<description><![CDATA[Hi Pinal,

I am using temp table in the stored procedure . The temp table is having identity column.

i am using the temp table in a loop. i.e. everytime i insert the data into temp table and delete the table, but as usual the identity column retains the value, is there any solution to reseed the value of the identity column of temporary table.


FYI i tired:
1. DBCC CHECKIDENT
2. delete from @temptable


is there any way out..?]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I am using temp table in the stored procedure . The temp table is having identity column.</p>
<p>i am using the temp table in a loop. i.e. everytime i insert the data into temp table and delete the table, but as usual the identity column retains the value, is there any solution to reseed the value of the identity column of temporary table.</p>
<p>FYI i tired:<br />
1. DBCC CHECKIDENT<br />
2. delete from @temptable</p>
<p>is there any way out..?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bertz</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-42672</link>
		<dc:creator><![CDATA[bertz]]></dc:creator>
		<pubDate>Thu, 11 Sep 2008 03:18:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-42672</guid>
		<description><![CDATA[How about if it&#039;s not an identity column?]]></description>
		<content:encoded><![CDATA[<p>How about if it&#8217;s not an identity column?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Srikanth</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-18393</link>
		<dc:creator><![CDATA[Srikanth]]></dc:creator>
		<pubDate>Fri, 09 Nov 2007 22:12:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-18393</guid>
		<description><![CDATA[i want to know whether identity column is on or off
the above query will retrieve all identity column whether it is on or off..

i want identity column on list only.]]></description>
		<content:encoded><![CDATA[<p>i want to know whether identity column is on or off<br />
the above query will retrieve all identity column whether it is on or off..</p>
<p>i want identity column on list only.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arshdeep</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-15766</link>
		<dc:creator><![CDATA[Arshdeep]]></dc:creator>
		<pubDate>Fri, 19 Oct 2007 12:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-15766</guid>
		<description><![CDATA[Thanks Pinal,

Was really hellpful in one my projects.. am under..]]></description>
		<content:encoded><![CDATA[<p>Thanks Pinal,</p>
<p>Was really hellpful in one my projects.. am under..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian Bleach</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-15117</link>
		<dc:creator><![CDATA[Adrian Bleach]]></dc:creator>
		<pubDate>Wed, 10 Oct 2007 15:42:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-15117</guid>
		<description><![CDATA[Thanks Pinal Dave - very useful crib. Managed to find the tables with 10000 increment (set in error) in less than a minute from typing the request into google.  Sometimes the magical interweb truly comes up trumps :-)

Thanks


Adrian Bleach]]></description>
		<content:encoded><![CDATA[<p>Thanks Pinal Dave &#8211; very useful crib. Managed to find the tables with 10000 increment (set in error) in less than a minute from typing the request into google.  Sometimes the magical interweb truly comes up trumps :-)</p>
<p>Thanks</p>
<p>Adrian Bleach</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kurov Moj</title>
		<link>http://blog.sqlauthority.com/2007/04/23/sql-server-query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-6130</link>
		<dc:creator><![CDATA[Kurov Moj]]></dc:creator>
		<pubDate>Sun, 29 Jul 2007 13:01:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/23/query-to-find-seed-values-increment-values-and-current-identity-column-value-of-the-table/#comment-6130</guid>
		<description><![CDATA[Da Vi ebem majkata na site sto nemat da go razberete ova !!!!]]></description>
		<content:encoded><![CDATA[<p>Da Vi ebem majkata na site sto nemat da go razberete ova !!!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

