Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Resetting an identity in SQL Server
Message
De
27/11/1998 20:01:50
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
À
27/11/1998 14:36:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00162000
Message ID:
00162064
Vues:
29
>One of our script to create the tables in SQL Server is defining the primary key field with IDENTITY. Then, there is another script which is populating the data into those tables. On the first run, it's ok as the primary key value starts from 1. On the second run, after we haved issued DELETE FROM CT_PRIORITY, the primary key is not starting from 1. Where do we have to go to reset that value?


If you need to insert your own identity values you can do this before the update:

SET IDENTITY_INSERT tablename ON

This allows you to insert your own value into the identity column.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform