| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Change columns datatype and order
Ach C via DBMonster.com wrote:
> Hi all,
> In fact I have two questions! :D
> 1.How to change a columns data type without making that column empty?
Depends on what change you are trying to do and what version of Oracle something you seem to think unimportant.
Generally speaking no problem with:
CREATE TABLE t (
mycol VARCHAR2(30));
ALTER TABLE t MODIFY (mycol VARCHAR(100));
but no chance with:
ALTER TABLE t MODIFY (mycol VARCHAR(1));
> 2.How to change the order of columns in a table?
> for the 2nd one,I know I can create a new table and do "select into" and...
> but I am curious about another way! ;)
You can't other than as you suggest and it really serves no useful purpose to do so except in the most special of circumstances: Adjust your thinking.
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Mon Jun 27 2005 - 03:03:37 CDT
![]() |
![]() |