Search Postgresql Archives

Re: Delete a table automatic?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/1/22 03:31, jian he wrote:


On Tue, Nov 1, 2022 at 2:33 PM 黄宁 <huangning0722@xxxxxxxxx> 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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux