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 |
|
Drobson2
Starting Member
6 Posts |
Posted - 2005-07-18 : 12:45:39
|
| Hello all,I'm having trouble generating the correct Alter table statement which will allow me to and both a Not Null and a default of 5 to an integer columnI started out with:Alter Table invoice alter invoice_charge_category_id int not null default 5but this is wrong. Looking at the help, it looks like I can't add a default to an existing column - or at least that's where I'm having trouble.Thanks for your help!!Dave |
|
|
Drobson2
Starting Member
6 Posts |
Posted - 2005-07-18 : 13:26:28
|
| Never mind! I found it!alter table <tbl name> add constraint <cnstrnt named> default <value> for <column name> |
 |
|
|
|
|
|