Postgresql之无法删除表(drop table)

前端之家收集整理的这篇文章主要介绍了Postgresql之无法删除表(drop table)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

由于不知道同事是怎么操作表,突然导致表a无法再被访问或通过DB工具打开,这时想先删除表再重建表a导入数据来恢复表a,发现无论是通过工具还是命令都无法删除表a。

出现类似如下提示

DROP TABLE products;

NOTICE:  constraint orders_product_no_fkey on table orders depends on table products
ERROR:  cannot drop table products because other objects depend on it
HINT:  Use DROP ... CASCADE to drop the dependent objects too.
http://www.postgresql.org/docs/8.3/static/ddl-depend.html给出了答案,及操作的方法 原文链接:https://www.f2er.com/postgresql/196395.html

猜你在找的Postgre SQL相关文章