Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Beginner
Message
De
07/06/2006 09:00:43
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Divers
Thread ID:
00598895
Message ID:
01127572
Vues:
29
>>Hi All,
>> I have a column field that has a identity increment set to 1
>>After i insert few records the value increase ...but after i delete all the records and insert again...the value are not back to 1
>>How can 1 change the value back to 1 ??
>>
>
>The TRUNCATE TABLE command resets identity to the seed for the column. If for some reason you cannot use it, take a look at DBCC CHECKIDENT in BOL.

Because I have foriegn keys referencing the table(s), I can't use the truncate table command, but this did lead me to another item in the BOL, which does do what I need, DBCC CHECKIDENT.

Thank you for your help!
Thank You

Rollin Burr

Politicians and diapers have one thing in common. They should both be changed regularly, and for the same reason.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform