Hey ravindran_eee, you cannot say that Oracle doesn't allow this conversion, because is not true.
You can do as in the example below :
ALTER TABLE my_table ( my_column varchar2(10) );
But is not recommended to play with this if you have some values on that column. Recommended is to export the rows, alter the table and then re-import the data.
So that's the truth about that... not that the Oracle does not allow...
Or, the solution provided by you. ( Personally I will go for your solution, rather to export/re-import the data on that table)
Main Topics
Browse All Topics





by: ravindran_eeePosted on 2009-01-29 at 15:29:44ID: 23503937
Oracle does not allow this conversion.. So follow the steps..
1. Add new column (temp) with desired datatype.
2. Copy data to the new column
3. Drop the original column
4. Add new column with the name of the original and the desired datatype
5. Copy data to the new column from the temp column
6. Drop temp column