Maybe can I do it from SQL menagement studio?
How I can reset table and start from 1?Hi,
have a look in the BOL for the following command:
DBCC CHECKIDENT ('HumanResources.Employee', RESEED, 30)
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de|||
One way to delete the data AND also reset the IDENTITY field is to TRUNCATE the table. (Check in Books Online, topic: Truncate.)
However, this may not be available if the table has PK-FK relationships with other tables.
|||Hmmm, but my table has PK-FK relationship. What now? Really I don't know how!|||If you want to truncate the table you will HAVE TO break the FK-PK first, othwerwise you will have to delete in the logical parent-child order.HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
No comments:
Post a Comment