471,873 Members | 1,220 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,873 software developers and data experts.

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 6443
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.