Re: Reseting Identity Seed

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 01/26/05


Date: Wed, 26 Jan 2005 10:45:28 +0100

Check out DBCC CHECKIDENT.

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ansari" <mudasar_ansari@yahoo.com> wrote in message news:uf4BRq4AFHA.4028@TK2MSFTNGP15.phx.gbl...
> hi all..
>
>
> I want to reset the identity seed value for a table... How can I do that...
> one method is to truncate table... but if table is used as parent in foreign
> key relationship; it does not allow to truncate the table... any other
> method?
>
> Ansari
>
>
>
> 


Relevant Pages

  • Re: setup a sql login which can only reset password
    ... I couldn't test it right now, because if I login as helpdesk, i reset the ... Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: Disabling indexes - when is usefull?
    ... It isn't uncommon to drop all indexes, truncate table, import data and then add back those indexes. ... Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: setup a sql login which can only reset password
    ... Do you mean that I reset with the old password? ... Tibor Karaszi, SQL Server MVP ... "Cannot alter login ' xxx', because it doesn't exist or you do not ...
    (microsoft.public.sqlserver.server)
  • Re: TempDB Configured Minimum Size
    ... Tibor Karaszi, SQL Server MVP ... we restarted the services to reset the tempdb ...
    (microsoft.public.sqlserver.server)
  • Re: How do I reset autonumbering in a table
    ... TRUNCATE TABLE will reset the identity column to its initial ... Note that there are restrictions as to when the TRUNCATE TABLE command can ... Details about DBCC CHECKIDENT can also be found in the SQL Server Books ...
    (microsoft.public.sqlserver.programming)