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

Alter Column datatype

P: 3
When I tried to change the datatype of the column through
"Alter table tablename Alter column columnname Newdatatype" query
it's is throw the error below:
"The index 'IndexName' is dependent on column 'columnname'" .

But it allowed me to change the column datatype through Enterprise Manager Table Designer without any restictions.

1) What is the reason for having the difference between 2 appraches?

2) How we change through the query the datatype of the column. Let me know the correct syntax.

Plz answer my query.
May 29 '08 #1
Share this Question
Share on Google+
1 Reply


code green
Expert 100+
P: 1,726
Never done this but it looks like you will need to DROP the INDEX before using ALTER on a table column.
Then add the INDEX
But it allowed me to change the column datatype through Enterprise Manager Table Designer without any restictions
1) What is the reason for having the difference between 2 appraches?
One is hard SQL code.
The other is a user friendly interface
May 29 '08 #2

Post your reply

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