Oracle 8 - Object references

From: Trevor Mountford <Trevor.Mountford_at_btinternet.com>
Date: 1998/01/03
Message-ID: <68m1a7$9oo$1_at_mendelevium.btinternet.com>#1/1


Please can you help.

I'm in the early stages of learning Oracle 8. I have managed to create a table which has a object reference column as below:

create table tab1
( acol number,
  addr REF address_type)

The addr column will reference a row in the address table which has been created from the address type as follows

create table address of address_type

I've inserted rows into the address table and referenced them in tab1 using

Insert into tab1
Select 1, REF(a)
From address a
Where id =1; -- Id is the primary key of the address table

If I want to change the reference to point to a different address how do I do it ? Do I use a modified update command ?

Your help would be much appreciated.

Thanking you in advance. Received on Sat Jan 03 1998 - 00:00:00 CET

Original text of this message