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 |
|
lane0618
Posting Yak Master
134 Posts |
Posted - 2002-06-04 : 19:32:43
|
| How would I alter the following code to insert the value of "0" for each row in column_a.ALTER TABLE finish ADD column_a BIT NULLThanks,Lane |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2002-06-04 : 19:49:32
|
| ALTER TABLE finish ADD column_a BIT NULL goUPDATE finish SET column_a=0goIf you set a default it won't work unless the column is not null e.g.ALTER TABLE finish ADD column_a BIT NOT NULL DEFAULT(0)HTHJasper Smith |
 |
|
|
olily
Starting Member
37 Posts |
Posted - 2002-06-05 : 03:34:08
|
| ALTER TABLE FINISH ADD column_a BIT NULL DEFAULT 0 WITH VALUESWITH VALUES will populate all the rows in your table with 0. |
 |
|
|
|
|
|