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

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

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

From: Kirk Bradley <kbradley_at_us.oracle.com>
Date: 1997/04/11
Message-ID: <kbradley-ya023180001104971721320001@192.86.155.83>#1/1

Not really true. You can decrease them. try this:

create table kirk1 ( a char(10));
alter table kirk1 a char(5);

works just fine.. the only trick is you have to do it when there is no data in the that column or you get..

 ORA-01441: column to be modified must be empty to decrease column length

I would agree that it's not an incredibly useful feature but..  ;-)

In article <01bc3a26$02c27d40$3364c0c2_at_phl>, "Peter H. Larsen" <petlars_at_pipmail.dknet.dk> wrote:

> No Igor,
>
> 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.
>
> --
> // Complete Data Service
> // Peter H. Larsen
> // petlars_at_pip.dknet.dk
>
> Igor Chernysh <igor_at_ios.com> skrev i artiklen <33373E6E.2186_at_ios.com>...
> > > Stephane Lajeunesse wrote:
> > >
> > > If I remember correctly, this is defined in the ANSI standard for SQL
> > > and is also true for Oracle (cannot drop a column, or chage it's
> > > datatype).
> >
> > The lastest is possible:
> > alter table employee modify last_name varchar2(2000);
> > WBW, Igor.
> >
Received on Fri Apr 11 1997 - 00:00:00 CDT

Original text of this message

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