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: ALTER TYPE

Re: ALTER TYPE

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Mon, 19 Jun 2006 21:30:32 +0800
Message-ID: <4496A6F8.204D@yahoo.com>


Mordashov_at_gmail.com wrote:
>
> > Post a clear test case and copy/paste what you've done.
> > Give your Oracle version.
> > And giving the OS does not hurt.
> Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 on Linux
> x86-64
>
> SQL> select OBJECT_NAME,SUBOBJECT_NAME,OBJECT_ID,a.timestamp from
> all_objects a where OBJECT_NAME='FIELD_OBJECT2';
>
> OBJECT_NAME SUBOBJECT_NAME OBJECT_ID TIMESTAMP
> ------------------------------ ------------------------------
> ---------- ------------
> SQL>
>
> CREATE OR REPLACE TYPE FIELD_OBJECT2 as object (
> descr varchar2 (50),
> field_name varchar2 (32),
> type_id number,
> data_type varchar2 (32) );
> /
> Type created
>
> create table TABLE_TEST
> (
> TEST FIELD_OBJECT2
> )
> /
>
> Table created
>
> ALTER TYPE FIELD_OBJECT2 ADD ATTRIBUTE (long_name VARCHAR2(300))
> CASCADE INCLUDING TABLE DATA;
>
> Type altered
>
> SQL> select OBJECT_NAME,SUBOBJECT_NAME,OBJECT_ID,a.timestamp from
> all_objects a where OBJECT_NAME='FIELD_OBJECT2';
>
> OBJECT_NAME SUBOBJECT_NAME OBJECT_ID TIMESTAMP
> --------------------------- ------------------------------ ----------
> -------------------
> FIELD_OBJECT2 83221
> 2006-06-19:15:40:48
> FIELD_OBJECT2 $VSN_1 83219
> 2006-06-19:15:40:19
>
> There are two versions of my object..I dont need older one, how can I
> drop it?

I raised a tar with Oracle a long time ago about the very same - and thet said that this is expected behaviour...you just need to get used to it.

check out USER_TYPE_VERSIONS

hth
connor

-- 
Connor McDonald
Co-author: "Mastering Oracle PL/SQL - Practical Solutions"
Co-author: "Oracle Insight - Tales of the OakTable"

web: http://www.oracledba.co.uk
web: http://www.oaktable.net
email: connor_mcdonald_at_yahoo.com


"Semper in excremento, sole profundum qui variat."

------------------------------------------------------------
Received on Mon Jun 19 2006 - 08:30:32 CDT

Original text of this message

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