I've many tables each one has a principal key that is a name column having a seed of just one.
I've another program which converts data from the previous database (dBase) to sql.
This programs needs Indentity = No.
How do i change Identity and Identity Seed from the code?
It may sound like you need to place values in to the IDENTITY column
It can be done using
SET IDENTITY_INSERT TableName ON INSERT INTO MyTable (IdentityColumn, Column1, Column2) Values (1, 2, 3) SET IDENTITY_INSERT TableName OFF
Note: you have to specify all of the column names
To reseed identity (to allows say start at 77) make use of the following command
dbcc checkident(TableName, RESEED, 77)
You shouldn't have to interrupt the table with regard to an information import, simply do this:
set identity_insert MyTable on insert into MyTable ... blah blah blah set identity_insert MyTable off