Re: Creating related tables
| От | A. Kretschmer |
|---|---|
| Тема | Re: Creating related tables |
| Дата | |
| Msg-id | 20051019130649.GA12829@webserv.wug-glas.de обсуждение исходный текст |
| Ответ на | Creating related tables (Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>) |
| Список | pgsql-novice |
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 ===
В списке pgsql-novice по дате отправления: