Re: ForeignKey-Constraint with more than 1 tables

From: Andreas Mosmann <>
Date: Fri, 28 Mar 2008 10:43:00 +0100
Message-ID: <>

Hans Mayr schrieb am 28.03.2008 in

> Hi Andreas,

> Maybe it is a solution to create a unique ID for each location. A new
> table TTreeLocations with LocationID, LocationType (Street,
> Park, ...), ObjectID (this being the ID of street, park etc.) would be
> a way to do this.

> Best,

> Hans

Hi Hans,

Soory, but I can not find the difference. If I understand correct you suggest to create a table TTreeLocations with a primary key LocationID and an ObjectID that now has to refer different tables, street, park ...

It is no problem to use 1 sequence for all referred tables street, park and so on, but how can I write a constraint, that ensures, that my ObjectID is to be found in (exactly) one of these tables?

Thank you
Andreas Mosmann

wenn email, dann AndreasMosmann <bei> web <punkt> de
Received on Fri Mar 28 2008 - 04:43:00 CDT

Original text of this message