-
Primary Key question
Hello All,
Here is an easy one, not for me though, that I hope you can answer.
I have a table with a integer primary-key and the way that it is working now, it starts off at 1 and adds 1 each time a new entry is added to the table. The standard method I think.
What I need to do is to empty the table and have the primary-key start off a say 1000 or 5000.
How can I set a default value for the Primary-Key to start out at?
Thanks,
Lonnie
-
If it's identity column, you can reseed it with 'dbcc checkident'.
-
Hello,
I looked at 'DBCC CHECKIDENT ' and it looks like it could be part of the solution.
The remaining part would be for me to:
1.) Not loose the existing data in the table.
2.) renumber the existing primary-key values starting from some initial RESEED value.
How about this?
Thanks,
Lonnie
-
Copy the table to testing server and do the test on it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|