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 |
|
fmardani
Constraint Violating Yak Guru
433 Posts |
Posted - 2005-08-19 : 10:43:17
|
| Hi,There is a table which has one of the columns set not to accept null.What is the script to make it accept null.Thanks |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-08-19 : 11:04:09
|
| Easiest way, I think, is to make the change in Enterprise Manager Table Designer, and then press the "Script the changes" button (which gives you a script you can cut&paste) and then abandon making the changes in E.M.This will give you a script which takes care of foreign keys, data conversion, and all sorts of other thorny issues!Kristen |
 |
|
|
fmardani
Constraint Violating Yak Guru
433 Posts |
Posted - 2005-08-19 : 11:18:03
|
| Hi,where do i find the script changes button as you suggested pls?Thanks |
 |
|
|
fmardani
Constraint Violating Yak Guru
433 Posts |
Posted - 2005-08-19 : 11:23:02
|
| Worked it out .Thanksalter table UM_TB_Personalter column lastname nvarchar(50) null |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-08-19 : 13:04:32
|
| "where do i find the script changes button as you suggested pls?"Third icon from the left, tooltip = "Save change script" - looks like an old fashion scroll & a floppy disk.Kristen |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-08-19 : 13:29:48
|
| alter table UM_TB_Personalter column lastname nvarchar(50) nullI belive that approach has consequences for leaving some "crud" in the table, which can lead to inefficiencies, but if its a small table I don't suppose it will make any odds!Kristen |
 |
|
|
|
|
|