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 -> Help: Creating a one-to-one Relationship

Help: Creating a one-to-one Relationship

From: Peter J Bishop <pjb_at_nortelnetworks.com>
Date: Mon, 25 Jan 1999 18:23:58 +0000
Message-ID: <36ACB6BE.6C49728F@nortelnetworks.com>


Simple question I know but...

I want to setup two tables with a one-to-one relationship between them. For the purposes of this message, each table would have one column.

For table_1 I understand that the SQL would be:

        create table table_1 (name varchar2(10) constraint pk_table_1
        primary key);

but for table_2 I'm not so sure. Would I create the second table using the same code as listed above (with table and constraint name changes) and then add a foreign key constraint between them or is there something else I should be doing?

Responses by email would be appreciated.

---

Peter Bishop
Email: pjb_at_nortelnetworks.com Received on Mon Jan 25 1999 - 12:23:58 CST

Original text of this message

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