SQL Language (MOSC)

MOSC Banner

Column datatype conversion from number to varchar2

edited Sep 28, 2012 5:58AM in SQL Language (MOSC) 2 commentsAnswered
We have a column that needs to be converted from number to varchar2. The table has millions of rows. What would be the best way to achieve the conversion?
One option is to
1) create a new column of type varchar2
2) update the new column with the old column
3) drop the old column
4) rename the new column back to the original name

Is there a better way? We are running on Oracle 11.2.0.3

Thanks

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center