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: How to Set Up Two One-to-One Tables?

Re: How to Set Up Two One-to-One Tables?

From: David Portas <REMOVE_BEFORE_REPLYING_dportas_at_acm.org>
Date: 11 Aug 2005 03:15:43 -0700
Message-ID: <1123755343.774521.44510@z14g2000cwz.googlegroups.com>


You just need a common primary key:

CREATE TABLE A (x INTEGER NOT NULL PRIMARY KEY, ...)

CREATE TABLE B (x INTEGER NOT NULL PRIMARY KEY REFERENCES A (x), ...)

--

David Portas
SQL Server MVP
--
Received on Thu Aug 11 2005 - 05:15:43 CDT

Original text of this message

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