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 |
|
amirmuthu
Starting Member
12 Posts |
Posted - 2008-03-10 : 06:47:22
|
| Hello Experts, Can any one tell me the query to modify the existing Column character length using QUERY? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-03-10 : 06:51:55
|
| do you mean changing that actual datatype? i.e. ALTER TABLE...or changing the data in that column? ...with a substring() function?or both?Em |
 |
|
|
ranganath
Posting Yak Master
209 Posts |
Posted - 2008-03-10 : 06:55:02
|
| Hi,ALTER TABLE TableName ALTER COLUMN ColumnName Datatype |
 |
|
|
amirmuthu
Starting Member
12 Posts |
Posted - 2008-03-10 : 06:59:24
|
| Yes, changing the Actual data typefor example : emp.ename varchar(10) is need to be change into emp.ename varchar(20) using query.Got it?Thanks for your time |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-03-10 : 07:00:28
|
Got it. Use the ALTER TABLE . . . ALTER COLUMN as shown by ranganath. Also refer to the BOL or the link that i provided for detail syntax KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
amirmuthu
Starting Member
12 Posts |
Posted - 2008-03-10 : 07:02:00
|
quote: Originally posted by ranganath Hi,ALTER TABLE TableName ALTER COLUMN ColumnName Datatype
Ranganath,Thank you so much.its working fine |
 |
|
|
|
|
|