Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resetting an identity in SQL Server
Message
From
27/11/1998 20:01:50
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
To
27/11/1998 14:36:20
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00162000
Message ID:
00162064
Views:
24
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform