am 19.10.2005, um 12:34:20 +0000 mailte Ângelo Marcos Rigo folgendes:
> Hi
>
> I need to create 1:N related tables .
>
> eg.: table A and a table B.
> - table B will have motorcicles
> - table A will have motorcicles owners
> If a owner is deleted from the table A i need to
> delete all the motorcicles with the deleted owner id
> in the B table.
>
> What is the sintax in postgesql todo this ?
test=> create table b (id int primary key);
CREATE TABLE
test=> create table a (id int references b on delete cascade);
CREATE TABLE
test=>
Regards, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47212, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===