469,626 Members | 883 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

to change datatype

138 100+
dear all,
i have to modify the datatype of a column of a table. the datatype of the column is varchar(2). i need to increase the length to 20. can u provide the query to change it
TIA
Dec 9 '07 #1
2 6377
rski
700 Expert 512MB
dear all,
i have to modify the datatype of a column of a table. the datatype of the column is varchar(2). i need to increase the length to 20. can u provide the query to change it
TIA
ALTER TABLE table_name ALTER COLUMN column_name TYPE new_type;
Dec 9 '07 #2
Hi,
i have solution for this
run this query

ALTER TABLE tableName ALTER COLUMN columnName TYPE
newdatatype;
Mar 12 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by J.C. Flores | last post: by
7 posts views Thread by dotnetnoob | last post: by
15 posts views Thread by =?Utf-8?B?UGhpbCBKb2huc29u?= | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.