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 |
|
sujosh
Yak Posting Veteran
55 Posts |
Posted - 2005-07-14 : 17:59:28
|
| Can we change the datatype in a column? Looking at BOL I came accross "object.AlterDataType( Datatype , [ Length ] , [ Precision ] , [ Scale ] )" How can I use this in an alter statement? In Oracle I know we can do thisalter table xyz modify name varchar2(3);Thanks |
|
|
ehorn
Master Smack Fu Yak Hacker
1632 Posts |
Posted - 2005-07-14 : 18:46:53
|
| Have a look at ALTER TABLE in Books Online |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-07-14 : 19:03:45
|
| Here's an example:ALTER TABLE ALTER COLUMN ColumnName varchar(50) NOT NULLTara |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-07-15 : 01:08:17
|
| Small Correction on Tara's codeALTER TABLE TableName ALTER COLUMN ColumnName varchar(50) NOT NULLMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|