Re: Updating IDENTITY

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Kestutis Adomavicius (kicker_at_nospam-mail.lt)
Date: 05/26/04


Date: Wed, 26 May 2004 15:19:37 +0300

You should use DBCC CHECKIDENT ('table_name', RESEED, new_reseed_value) to
change table's identity column seed (next value which will be assigned).

-- 
Regards,
Kestutis Adomavicius
Consultant
UAB "Baltic Software Solutions"
"Peter" <anonymous@discussions.microsoft.com> wrote in message
news:12c3801c4430f$7516b790$a101280a@phx.gbl...
> Dear All,
> Due to reasons too long to explain our identity columns
> are getting out of sych.
>
> Using the command
> SELECT name from sysobjects where xtype = 'U' i would like
> to loop though all my tables and update the internal value
> (not the one on the table but the one held if you do a
> IDENT_CURRENT(tablename) of the identity.
>
> Can someone help me with some code her as I'm foxed.
>
> Peter


Relevant Pages

  • Re: Random number
    ... Thank you very much, Louis. ... > create table testRand ... > "Peter Afonin" wrote in message ... I could create an identity column, ...
    (microsoft.public.sqlserver.server)
  • Re: Random number
    ... Thank you very much, Louis. ... > create table testRand ... > "Peter Afonin" wrote in message ... I could create an identity column, ...
    (microsoft.public.sqlserver.programming)
  • RE: Is there any issue with autoincremented field?
    ... the SQL Server table is Identity column not uniqueidentifier column. ... "Peter" wrote: ... > into a VFP 9 table. ... I wonder whether I should use autoincremented field or ...
    (microsoft.public.fox.vfp.dbc)
  • IDENTITY_INSERT Status?
    ... Peter ... >I already make the Identity Column in a table. ... >Cannot insert explicit value for identity column in table ... >What shoud i need to make it work? ...
    (microsoft.public.sqlserver.programming)