arrays and references

Поиск
Список
Период
Сортировка
Искать

arrays and references

От:
Mathieu Arnold <mat@mat.cc>
Дата:
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

От:
Travis Bauer <trbauer@indiana.edu>
Дата:
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

От:
Stephan Szabo <sszabo@megazone23.bigpanda.com>
Дата:

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.


FAQ