Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Does ORACLE has any stupid restrictions like MS-SQL

Re: Does ORACLE has any stupid restrictions like MS-SQL

From: Jacob Love <jlove_at_engin.umich.edu>
Date: 1997/03/31
Message-ID: <5hoh7r$6ko@srvr1.engin.umich.edu>#1/1

In article <01bc3a26$02c27d40$3364c0c2_at_phl>, Peter H. Larsen <petlars_at_pipmail.dknet.dk> wrote:
>Stephane is right - you cannot CHANGE a datatype - but you can extent it.
>Meaning you can extent NUMBER(5) to NUMBER(10), VARCHAR2(10) to
>VARCHAR2(50). But you can NEVER decrease either.
>
>To make any converstion you must create a copy of the table using create
>table as select, rename/drop the old, rename the new, and voila.

I don't believe this is true. You can convert from varchar to number if you empty the column of all data. In fact, before typing this message, I tested it without problems. What is true is that you cannot drop the column altogether. Emptying the column is a bit of a chore (you have to copy the data to another table with a proper key so that you will be able to copy it back), update the table setting the field to null, modify the field and then restore the data. But it's less of a chore than doing this with the entire table.

-- 
-----------------------
Jack F. Love
Opinions expressed are mine alone, unless you happen to agree
Received on Mon Mar 31 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US