RE: changing a column type

  • From: "Powell, Mark" <mark.powell2@xxxxxx>
  • To: oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 1 Jun 2012 19:43:11 +0100

Observe:

MPOWEL01@UT1> create table marktest2 ( fld1 number, fld2 varchar2(30));

Table created.

MPOWEL01@UT1> insert into marktest2 values (1,'something or other');

1 row created.

MPOWEL01@UT1> commit;

Commit complete.

MPOWEL01@UT1> alter table marktest2 modify (fld1 varchar2(10));
alter table marktest2 modify (fld1 varchar2(10))
                              *
ERROR at line 1:
ORA-01439: column to be modified must be empty to change datatype


MPOWEL01@UT1>

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Zelli, Brian
Sent: Friday, June 01, 2012 1:51 PM
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,
Brian

Brian Zelli
Senior Database Administrator
Enterprise Applications/Systems Integration Roswell Park Cancer Institute
(716) 845-4460
brian.zelli@xxxxxxxxxxxxxxx



This 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 you.-- 
//www.freelists.org/webpage/oracle-l


--
//www.freelists.org/webpage/oracle-l


Other related posts: