table with subtypes, inserting problem

From: Shearer <>
Date: Sun, 09 Nov 2008 13:15:43 GMT
Message-ID: <3oBRk.99831$>

create or replace type IndirizzoTY as object
(via varchar(30),

comune varchar(20),
provincia char(2));

create or replace type PersonaTY as object
(cognome varchar(20),

nome varchar(15),
indirizzo indirizzoTY);

create table Persona of PersonaTY;

insert into Persona values('Insegno','Pino',IndirizzoTY('Via Dante','Roma','Rm'));

create type TelefonoTY as object
(abitazione varchar(12),

ufficio varchar(12),
cellulare varchar(12));

alter type PersonaTY add attribute (telefono REF TelefonoTY) cascade;

create table Telefono of TelefonoTY;

insert into Telefono values('099342312','099102121','3498282821');

insert into Persona

     select 'Smith','John'.................................

How to insert values into the column "indirizzo" of Persona? Received on Sun Nov 09 2008 - 07:15:43 CST

Original text of this message