By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,665 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

to change datatype

100+
P: 138
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
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 700
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

P: 4
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.