Cor Ligthert [MVP]
11/8/2007 6:51:00 PM
Bill,
> Setting the Identity column properties like Seed and AutoIncrement should
> only be done on an empty table--not when tables already exist. It's rarely
> a good idea to change the PK anyway.
I did it yesterday with a corrupted datatable from an SQL server 2000, which
was corrupt because that there was no primary key and was handled using SQL
Management Studio (it was not me who did it, so I am not sure what exactly
was the reason).
I could only do it with the SQL Enterprise tools. However it did help me a
lot.
Therefore never say never.
:-)
Cor
"William Vaughn" <billvaNoSPAM@betav.com> schreef in bericht
news:elJU7ZjIIHA.4592@TK2MSFTNGP02.phx.gbl...
>
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant, Dad, Grandpa
> Microsoft MVP
> INETA Speaker
> www.betav.com
> www.betav.com/blog/billva
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> -----------------------------------------------------------------------------------------------------------------------
>
> "Cirene" <test@test.com> wrote in message
> news:OlvnQTJIIHA.4476@TK2MSFTNGP06.phx.gbl...
>> What if the rows already exist? There are 3 rows that i don't want to
>> recreate, but it won't let me manually change the PK field. Any ideas?
>> Thanks!
>>
>> "William (Bill) Vaughn" <billvaRemoveThis@betav.com> wrote in message
>> news:2DBCD4E7-75BD-4BAD-930B-574B3BD46A3F@microsoft.com...
>>> When the table is first created, use an IdentitySeed value of 100.
>>>
>>> --
>>> ____________________________________
>>> William (Bill) Vaughn
>>> Author, Mentor, Consultant
>>> Microsoft MVP
>>> INETA Speaker
>>> www.betav.com/blog/billva
>>> www.betav.com
>>> Please reply only to the newsgroup so that others can benefit.
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>> __________________________________
>>> Visit www.hitchhikerguides.net to get more information on my latest
>>> book:
>>> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
>>> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
>>> -----------------------------------------------------------------------------------------------------------------------
>>> "Cirene" <test@test.com> wrote in message
>>> news:e3mKixIIIHA.5328@TK2MSFTNGP05.phx.gbl...
>>>>I have a table with the PK field defined as an identity field with the
>>>>increment of 1. How do I START the calculations at 100, rather than 1?
>>>>
>>>
>>
>>
>