博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PostgreSQL删除父表
阅读量:6880 次
发布时间:2019-06-26

本文共 377 字,大约阅读时间需要 1 分钟。

在PostgreSQL中,定义父子表后,子表可以随便删除,但是父表删除时,必须使用CASCADE级联删除或者先把子表都删了,示例如下: postgres=# drop table cities; ERROR:  cannot drop table cities because other objects depend on it DETAIL:  table capitals depends on table cities HINT:  Use DROP ... CASCADE to drop the dependent objects too. postgres=# drop table cities cascade; NOTICE:  drop cascades to table capitals DROP TABLE postgres=#

转载地址:http://lxgfl.baihongyu.com/

你可能感兴趣的文章
iOS 内存字节对齐
查看>>
Leetcode 611 javascript Valid Triangle Number
查看>>
ES6新特性总结之函数和扩展运算符...
查看>>
[译] Android 生命周期备忘录 — 第三部分:Fragments
查看>>
UICollectionView(集合视图学习笔记)
查看>>
Android TabLayout设置setupWithViewPager标题不显示
查看>>
Mobx入门和较佳实践
查看>>
展望2018,多媒体开发新趋势
查看>>
java callback
查看>>
移动端左滑右滑组件
查看>>
Android开发之AOP编程
查看>>
解决busuanzi_count突然失效的方法(hexo-theme-next)
查看>>
VUE中diff比较
查看>>
新零售技术和意义
查看>>
Coordinator Layout使用
查看>>
基于Mixin Network的C#语言比特币开发教程 : 用 Mixin Messenger 机器人接受和发送比特币...
查看>>
iOS开发之有间距的UITableViewCell
查看>>
Exception和Error的理解
查看>>
D2 日报 2019年2月27日
查看>>
parseInt parseFloat Number
查看>>