Re: Removing Rows in Foreign Keys

Поиск
Список
Период
Сортировка
От brew@theMode.com
Тема Re: Removing Rows in Foreign Keys
Дата
Msg-id Pine.BSF.4.58.0504040423000.86885@themode.com
обсуждение исходный текст
Ответ на Re: Removing Rows in Foreign Keys  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-novice
Michael.....

> > Is there a SQL command that removes both a row in a table and the rows in
> > other tables that reference it or do I have to do it manually?
>
> If you define the foreign key constraints as ON DELETE CASCADE,
> then referencing rows will be automatically deleted when you DELETE
> the referenced row.

Ah Ha, thanks muchly!!!  That's just what I was looking for.

brew

 ==========================================================================
                  Strange Brew   (brew@theMode.com)
  Check out my Stock Option Covered Call website  http://www.callpix.com
     and my Musician's Online Database Exchange http://www.TheMode.com
 ==========================================================================


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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Removing Rows in Foreign Keys
Следующее
От: John DeSoi
Дата:
Сообщение: Re: Database Encoding