Re: changing a column type

  • From: "Tim Gorman" <tim@xxxxxxxxx>
  • To: Brian.Zelli@xxxxxxxxxxxxxxx, "oracle-l" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 01 Jun 2012 18:38:23 +0000

In 10gR2...
SQL> create table test (col1 number);

Table created.

SQL> insert into test values (1);

1 row created.

SQL> alter table test modify (col1 varchar2(30));
alter table test modify (col1 varchar2(30))
ERROR at line 1:
ORA-01439: column to be modified must be empty to change datatype

SQL> delete test;

1 row deleted.

SQL> alter table test modify (col1 varchar2(30));

Table altered.

-----Original Message-----
From: Zelli, Brian [mailto:Brian.Zelli@xxxxxxxxxxxxxxx]
Sent: Friday, June 1, 2012 11:51 AM
To: 'oracle-l'
Subject: changing a column type

A colleague wants to change a column type from numeric to alpha-numeric. Can he 
change it with data in it?ciao,BrianBrian ZelliSenior Database 
AdministratorEnterprise Applications/Systems IntegrationRoswell Park Cancer 
Institute(716) 845-4460brian.zelli@xxxxxxxxxxxxxxxxxxx email message may 
contain legally privileged and/or confidential information. If you are not the 
intended recipient(s), or the employee or agent responsible for the delivery of 
this message to the intended recipient(s), you are hereby notified that any 
disclosure, copying, distribution, or use of this email message is prohibited. 
If you have received this message in error, please notify the sender 
immediately by e-mail and delete this email message from your computer. Thank 


Other related posts: