Click here to Skip to main content
15,896,557 members
Home / Discussions / Database
   

Database

 
GeneralRe: Puzzles me how to check a columns value Pin
Christian Graus3-Jul-05 11:23
protectorChristian Graus3-Jul-05 11:23 
GeneralRe: Puzzles me how to check a columns value Pin
gharryh3-Jul-05 20:08
gharryh3-Jul-05 20:08 
GeneralRe: Puzzles me how to check a columns value Pin
Christian Graus4-Jul-05 13:10
protectorChristian Graus4-Jul-05 13:10 
GeneralRe: Puzzles me how to check a columns value Pin
toxcct1-Jul-05 21:32
toxcct1-Jul-05 21:32 
GeneralRe: Puzzles me how to check a columns value Pin
toxcct1-Jul-05 21:35
toxcct1-Jul-05 21:35 
GeneralRe: Puzzles me how to check a columns value Pin
gharryh1-Jul-05 23:29
gharryh1-Jul-05 23:29 
Questionhow can i change an identity seed of a colomn via transact sql Pin
m.rastgar1-Jul-05 7:58
m.rastgar1-Jul-05 7:58 
AnswerRe: how can i change an identity seed of a colomn via transact sql Pin
Scott Serl1-Jul-05 10:57
Scott Serl1-Jul-05 10:57 
I don't think you can change the seed of a column. You must drop the column (in an alter table statement) and recreate it with the new seed and increment. Of coarse, you must first drop the relationships before you can drop the column.
1. use ALTER TABLE to delete the foreign key relationship in the other table
2. drop the identity column using ALTER TABLE
3. add the identity column back with the seed and increment you want using ALTER TABLE
4. add the relationship back into the other table using ALTER TABLE
Not a pleasant operation. In general, it is not good to use an identity column if you are expecting particular values; it might be better to design a stored procedure to generate the values you want, and put them in an ordinary int column with a UNIQUE constraint.
GeneralMS SQL 2000 Server database Pin
phokojoe1-Jul-05 6:01
phokojoe1-Jul-05 6:01 
GeneralRe: MS SQL 2000 Server database Pin
Yulianto.1-Jul-05 17:07
Yulianto.1-Jul-05 17:07 
GeneralRe: MS SQL 2000 Server database Pin
phokojoe3-Jul-05 21:52
phokojoe3-Jul-05 21:52 
GeneralRe: MS SQL 2000 Server database Pin
Yulianto.3-Jul-05 21:55
Yulianto.3-Jul-05 21:55 
GeneralSQL database table Pin
phokojoe3-Jul-05 21:54
phokojoe3-Jul-05 21:54 
GeneralRe: SQL database table Pin
Yulianto.3-Jul-05 22:08
Yulianto.3-Jul-05 22:08 
GeneralRe: SQL database table Pin
phokojoe3-Jul-05 23:34
phokojoe3-Jul-05 23:34 
GeneralRe: SQL database table Pin
Yulianto.3-Jul-05 23:46
Yulianto.3-Jul-05 23:46 
GeneralMS SQL database table Pin
phokojoe4-Jul-05 20:32
phokojoe4-Jul-05 20:32 
GeneralRe: MS SQL database table Pin
Yulianto.4-Jul-05 20:43
Yulianto.4-Jul-05 20:43 
GeneralRe: MS SQL database table Pin
phokojoe10-Jul-05 22:00
phokojoe10-Jul-05 22:00 
GeneralRe: SQL database table Pin
phokojoe24-Jul-05 2:53
phokojoe24-Jul-05 2:53 
GeneralRe: SQL database table Pin
Yulianto.24-Jul-05 15:28
Yulianto.24-Jul-05 15:28 
GeneralRe: SQL database table Pin
phokojoe24-Jul-05 21:24
phokojoe24-Jul-05 21:24 
GeneralRe: SQL database table Pin
Yulianto.24-Jul-05 22:20
Yulianto.24-Jul-05 22:20 
GeneralRe: SQL database table Pin
phokojoe24-Jul-05 22:39
phokojoe24-Jul-05 22:39 
GeneralRunning Total Pin
samoore1-Jul-05 4:50
samoore1-Jul-05 4:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.