resetting IDENTITY after CREATE TABLE
From: Greg Shaw (greg_at_nospam.com.au)
Date: 05/09/04
- Next message: Alan: "Re: resetting IDENTITY after CREATE TABLE"
- Previous message: Aaron Bertrand [MVP]: "Re: What did I do wrong?"
- Next in thread: Alan: "Re: resetting IDENTITY after CREATE TABLE"
- Reply: Alan: "Re: resetting IDENTITY after CREATE TABLE"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 09 May 2004 22:53:56 GMT
I have a script that builds my database including all the IDENTITY
columns. In the script I set them to (1,1). I now have the problem
where some client sites already have a numbering system in place and
need to start the sequence from some arbitrary point. This is before
the table has data. We just want to match the new system with their
existing numbering sequence.
How do I set the IDENTITY seed after I have created the table?
Alternatively, How do I automatically generate a script for an
arbitrary table so that I can modify the IDENTITY seed and recreate
the table without having to do it manually for each table concerned?
Also, where is there documentation on the stored procs included with
SQLServer. Maybe one of them does the jobs I just can't find it.
Thanks, Greg.
- Next message: Alan: "Re: resetting IDENTITY after CREATE TABLE"
- Previous message: Aaron Bertrand [MVP]: "Re: What did I do wrong?"
- Next in thread: Alan: "Re: resetting IDENTITY after CREATE TABLE"
- Reply: Alan: "Re: resetting IDENTITY after CREATE TABLE"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|