Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
howto:reset_identity_column_value_in_sql_server [2011/11/23 20:24] smarkhowto:reset_identity_column_value_in_sql_server [2011/12/19 21:15] (current) smark
Line 12: Line 12:
  
 This means that the number you input in place of 'identvalue' should be the CURRENT last index. The next value will be identvalue + 1. If you enter 999 then the next record inserted will have a value of 1000. This means that the number you input in place of 'identvalue' should be the CURRENT last index. The next value will be identvalue + 1. If you enter 999 then the next record inserted will have a value of 1000.
 +
 +To reset a table:
 +<code>
 +DBCC CHECKIDENT (tablename, RESEED, 0)
 +</code>
  
 ===== Sources ===== ===== Sources =====
 http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/ http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/
howto/reset_identity_column_value_in_sql_server.1322079850.txt.gz · Last modified: 2011/11/23 20:24 by smark
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0