Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jim_jim
Constraint Violating Yak Guru
306 Posts |
Posted - 2010-10-08 : 15:10:03
|
| HiI have added a new column(seq) in sql to an existing table(Report)which already has 100000 records in itnow I am trying to make the new column(seq) as a constraint with the below autogenerated code and it failsALTER TABLE [Request] ADD CONSTRAINT [REPORT_Seq] DEFAULT ((0)) FOR [Seq]GOFails with the below error messageMsg 1781 column has already a DEFAULT bound to itcan someone assist me to debug thisThanksVamsi |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
jim_jim
Constraint Violating Yak Guru
306 Posts |
Posted - 2010-10-08 : 15:32:08
|
| The SQL I had in my post is autogenerated from our testing databaseand when I run the same script on the stage I get the errorI need another way to do this manuallywhere I can populate all the values of the newly created column to '0' and then try to add the constraint |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-10-08 : 18:30:16
|
UPDATE RequestSET Seq = 0WHERE Seq IS NULL N 56°04'39.26"E 12°55'05.63" |
 |
|
|
|
|
|