Link to home
Start Free TrialLog in
Avatar of FutureDBA-
FutureDBA-

asked on

Changing data type on column with data already in it.

Experts,

I have a table with a column for order quantities. Right now the column is varchar2. I need to change it to number.

Is it possible to do this without me having to empty out the table?

All of the rows have numbers in it.

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of David VanZandt
David VanZandt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

>>Is it possible to do this without me having to empty out the table?

The answer to your question is: yes.

The post above provides the syntax.

The alter table command will fail if there is data that Oracle cannot convert.