Re: How to delete multiple rows from multiple joined tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to delete multiple rows from multiple joined tables
Дата
Msg-id 2306.1053968142@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to delete multiple rows from multiple joined tables  ("Michael Mattox" <michael.mattox@verideon.com>)
Список pgsql-sql
"Michael Mattox" <michael.mattox@verideon.com> writes:
> I want to delete all rows in table C & B that correspond to a row in Table
> A.

Depending on how automatic you want that to be, perhaps foreign keys
would do what you want?  You could set up B's and C's links to A as
"on delete cascade" foreign keys, and then a deletion from A would
clean them up too.
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Peter Childs
Дата:
Сообщение: Re: Many-to-Many relation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: timestamp field - select error