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: Creating types in Orace 9i: why it doesn't work?

Re: Creating types in Orace 9i: why it doesn't work?

From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 22 Nov 2002 11:40:57 -0800
Message-ID: <130ba93a.0211221140.5d4af913@posting.google.com>


Well, best to read a bit b4 testing it. Look up SQL reference manual on how to create a user_defined datatype. A simple example would be like,

create or replace type as object (.....);

and then you can

create table <name> of <the type you created>;

"Roman Zhovtulya" <roman_at_fh-offenburg.de> wrote in message news:<arli5s$grf$1_at_news.BelWue.DE>...
> Hello,
> Just wondering if anyone had the problem creating types in Oracle 9i (I'm
> trying to explore object-oriented features of Oracle).
> The strange thing is that it goesn't give any error when I execute the
> following (I've tried both Toad and SQLPlus):
>
> create type Persontype
> (
> PersNr integer,
> Name varchar(30),
> primary key (EmpNr)
> );
>
> , but it gives "invalid datatype" error when I execute the following:
>
> create table Student of persontype;
>
> Any help would be appreciated.
>
> Thanks a lot,
> Roman Zhovtulya
>
> Database Lab
>
> -------------------------------------------------------
> M.Sc. Roman Zhovtulya
> Research Assistant
> Database Lab
> Offenburg University of Applied Sciences
>
> roman_at_fh-offenburg.de
> -------------------------------------------------------
Received on Fri Nov 22 2002 - 13:40:57 CST

Original text of this message

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