<?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/"
		>
<channel>
	<title>Comments on: Reset Identity Column Value in SQL Server</title>
	<atom:link href="http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/</link>
	<description>Computer Help from your Friendly How-To Geek</description>
	<lastBuildDate>Sun, 22 Nov 2009 05:17:06 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mick</title>
		<link>http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/comment-page-1/#comment-80214</link>
		<dc:creator>Mick</dc:creator>
		<pubDate>Wed, 18 Nov 2009 17:49:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/#comment-80214</guid>
		<description>Great, thanks. Strange thing though. It worked exactly as advertised testing in SQL Server Management Studio Express with SQL Server 2005.  But when I coded it up in Java (using sqljdbc) running against the same database, the next value was not reseed + 1, but the reseed value itself (as haridsv found).</description>
		<content:encoded><![CDATA[<p>Great, thanks. Strange thing though. It worked exactly as advertised testing in SQL Server Management Studio Express with SQL Server 2005.  But when I coded it up in Java (using sqljdbc) running against the same database, the next value was not reseed + 1, but the reseed value itself (as haridsv found).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ric</title>
		<link>http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/comment-page-1/#comment-76807</link>
		<dc:creator>Ric</dc:creator>
		<pubDate>Fri, 18 Sep 2009 11:21:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/#comment-76807</guid>
		<description>Brilliant, thanks</description>
		<content:encoded><![CDATA[<p>Brilliant, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yogesh</title>
		<link>http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/comment-page-1/#comment-76323</link>
		<dc:creator>Yogesh</dc:creator>
		<pubDate>Sat, 05 Sep 2009 05:05:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/#comment-76323</guid>
		<description>Thanks :-)</description>
		<content:encoded><![CDATA[<p>Thanks <img src='http://www.howtogeek.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prodis</title>
		<link>http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/comment-page-1/#comment-74948</link>
		<dc:creator>Prodis</dc:creator>
		<pubDate>Tue, 04 Aug 2009 15:03:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/#comment-74948</guid>
		<description>Thank you for information. It was usefull.</description>
		<content:encoded><![CDATA[<p>Thank you for information. It was usefull.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: haridsv</title>
		<link>http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/comment-page-1/#comment-74597</link>
		<dc:creator>haridsv</dc:creator>
		<pubDate>Thu, 23 Jul 2009 01:39:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/#comment-74597</guid>
		<description>Thanks a lot. For me, if I use the value of 0 to reseed, sql server 2005 didn&#039;t start from 1, but actually from 0. May be the +1 statement is not correct?</description>
		<content:encoded><![CDATA[<p>Thanks a lot. For me, if I use the value of 0 to reseed, sql server 2005 didn&#8217;t start from 1, but actually from 0. May be the +1 statement is not correct?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nirman Doshi</title>
		<link>http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/comment-page-1/#comment-73923</link>
		<dc:creator>Nirman Doshi</dc:creator>
		<pubDate>Thu, 02 Jul 2009 12:55:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/#comment-73923</guid>
		<description>Thanks a lot
i was searching for this</description>
		<content:encoded><![CDATA[<p>Thanks a lot<br />
i was searching for this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit Yenurkar</title>
		<link>http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/comment-page-1/#comment-69860</link>
		<dc:creator>Amit Yenurkar</dc:creator>
		<pubDate>Mon, 06 Apr 2009 13:14:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/#comment-69860</guid>
		<description>Thanks a lot!!!!!!!!!
Useful Stuff............</description>
		<content:encoded><![CDATA[<p>Thanks a lot!!!!!!!!!<br />
Useful Stuff&#8230;&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/comment-page-1/#comment-58951</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Wed, 08 Oct 2008 18:39:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/#comment-58951</guid>
		<description>Thanks Geek - worked like a charm</description>
		<content:encoded><![CDATA[<p>Thanks Geek &#8211; worked like a charm</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tdow</title>
		<link>http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/comment-page-1/#comment-45771</link>
		<dc:creator>tdow</dc:creator>
		<pubDate>Wed, 16 Apr 2008 00:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/#comment-45771</guid>
		<description>I created a script that will do what you want, lakshmi.  Just replace MyId and mytbl below:

DECLARE  @MaxId INT

SELECT @MaxId = MAX( MyId )
FROM mytbl (NOLOCK)

PRINT &#039;Resetting Identity value to : &#039; + CONVERT( VARCHAR, @MaxId )
PRINT &#039;&#039;

DBCC CHECKIDENT (&#039;mytbl&#039;, RESEED, @MaxId)

PRINT &#039;&#039;

-- Verify
DBCC CHECKIDENT (&#039;mytbl&#039;, NORESEED)</description>
		<content:encoded><![CDATA[<p>I created a script that will do what you want, lakshmi.  Just replace MyId and mytbl below:</p>
<p>DECLARE  @MaxId INT</p>
<p>SELECT @MaxId = MAX( MyId )<br />
FROM mytbl (NOLOCK)</p>
<p>PRINT &#8216;Resetting Identity value to : &#8216; + CONVERT( VARCHAR, @MaxId )<br />
PRINT &#8221;</p>
<p>DBCC CHECKIDENT (&#8217;mytbl&#8217;, RESEED, @MaxId)</p>
<p>PRINT &#8221;</p>
<p>&#8211; Verify<br />
DBCC CHECKIDENT (&#8217;mytbl&#8217;, NORESEED)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lakshmi</title>
		<link>http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/comment-page-1/#comment-40329</link>
		<dc:creator>lakshmi</dc:creator>
		<pubDate>Wed, 12 Mar 2008 11:13:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/#comment-40329</guid>
		<description>This is great.  But how to make the following code work:
declare @seqno int
set @seqno = DBCC CHECKIDENT (orders, NORESEED)
DBCC CHECKIDENT ( &#039;databasename.dbo.orders&#039;,RESEED, @seqno)</description>
		<content:encoded><![CDATA[<p>This is great.  But how to make the following code work:<br />
declare @seqno int<br />
set @seqno = DBCC CHECKIDENT (orders, NORESEED)<br />
DBCC CHECKIDENT ( &#8216;databasename.dbo.orders&#8217;,RESEED, @seqno)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
