Re: Delete a table automatic?

Поиск
Список
Период
Сортировка
От Rob Sargent
Тема Re: Delete a table automatic?
Дата
Msg-id b1e0a28e-f4f7-fd93-acc4-82cc46d9aae9@gmail.com
обсуждение исходный текст
Ответ на Re: Delete a table automatic?  (jian he <jian.universality@gmail.com>)
Ответы Re: Delete a table automatic?  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список pgsql-general
On 11/1/22 03:31, jian he wrote:


On Tue, Nov 1, 2022 at 2:33 PM 黄宁 <huangning0722@gmail.com> wrote:
I now have two tables named A and B. Table B is calculated based on the data of table A. I wonder if table B can be automatically deleted when table A is deleted?

Your question seems not that specific.
You can use https://dbfiddle.uk/btGcOH30 to showcase your specific problem/question.

you can use DROP TABLE CASCADE.


Only If B has a foreign key reference to A
--
 I recommend David Deutsch's <<The Beginning of Infinity>>

  Jian



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

Предыдущее
От: jian he
Дата:
Сообщение: Re: Delete a table automatic?
Следующее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Delete a table automatic?