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: Oracle8: ALTER TYPE does not work ?

Re: Oracle8: ALTER TYPE does not work ?

From: Andrew Protasov <oracle_at_protasov.kiev.ua>
Date: Mon, 7 Dec 98 22:10:51 +0200
Message-ID: <ACBP3RsK42@protasov.kiev.ua>

Hi,

You are right - you can not change object type which is referenced. It is very serious limitation. I prefer object views instead of object tables because of this limitation at present moment.

Andrew Protasov

> Andrew Protasov (oracle_at_protasov.kiev.ua) wrote:
>
> : > I am setting up an oracle training for our students, including
> : > a small Oracle8 part.
> : >
> : > [...]
> : >
> : > CREATE OR REPLACE TYPE GeoCoord AS OBJECT
> : > (Longitude NUMBER,
> : > Latitude NUMBER);
> : > /
> : > 2 3 4
> : > Typ wurde erstellt.
> : > [engl: Type has been generated]
> : >
> : > SQL> ALTER TYPE GeoCoord REPLACE AS OBJECT
> : > (bla number);
> : > 2 ALTER TYPE GeoCoord REPLACE AS OBJECT
> : > *
> : > FEHLER in Zeile 1:
> : > ORA-22319: Typattributinformationen in ALTER TYPE geaendert
> : > [engl: Type Attribute Information changed with ALTER TYPE]
> : >
> : > Any hints (the same occurs when member methods are defined in the
> : > ALTER TYPE statement) ?
>
> : Why do you not use CREATE or REPLACE instead of ALTER?
>
> I hope to have the possibility to add features to a type which is
> already used in table definitions *without* having to drop
> these tables (although stated in some books, REPLACE is not possible
> when a type ist already used):
>
> SQL> CREATE OR REPLACE TYPE GeoCoord AS OBJECT
> 2 (MEMBER FUNCTION bla (gaga IN NUMBER) RETURN number);
> 3
> 3 /
> CREATE OR REPLACE TYPE GeoCoord AS OBJECT
> *
> FEHLER in Zeile 1:
> ORA-02303: Typ mit abhngigen Typen oder Tabellen kann nicht geloescht
> oder veraendert werden.
> [engl: a type with dependent types or tables cannot be deleted or
> changed]
>
> (since it is for an educational course, I would prefer an incremental
> approach by ALTER TYPE -- especially since ALTER TYPE is given in
> the manual)
>
> Is this expected to change in further releases (currently using
> 8.0.3.0.0)?
>
> Wolfgang
>
> -- -----------------------------------------------------------------
> Dipl.Inform.Wolfgang May E-mail: may_at_informatik.uni-freiburg.de
> Universitaet Freiburg http://www.informatik.uni-freiburg.de/~may/
> Institut fuer Informatik D-79110 Freiburg / Germany
> Lehrstuhl fuer Datenbanken und Informationssysteme
>
>
>
Received on Mon Dec 07 1998 - 14:10:51 CST

Original text of this message

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