Thread: arrays and references

arrays and references

From
Mathieu Arnold
Date:
Hi

I was wondering if there was a possibity to do something like this :
create table a (a int primary key);
create table b (b int primary key, a int[] references a(a));
to avoid having to create another table to join the two tables.

--
Mathieu Arnold

Re: arrays and references

From
Travis Bauer
Date:
Mathieu Arnold wrote:

> Hi
>
> I was wondering if there was a possibity to do something like this :
> create table a (a int primary key);
> create table b (b int primary key, a int[] references a(a));
> to avoid having to create another table to join the two tables.
>

You could create table a, table containing b and a, and a view c, which
refers to a and b, giving you the structure you want.

--
Travis Bauer


Re: arrays and references

From
Stephan Szabo
Date:
On Thu, 21 Mar 2002, Mathieu Arnold wrote:

> Hi
>
> I was wondering if there was a possibity to do something like this :
> create table a (a int primary key);
> create table b (b int primary key, a int[] references a(a));
> to avoid having to create another table to join the two tables.

Not currently.