当前位置:网站首页>Database cascading operation
Database cascading operation
2022-06-30 11:29:00 【TYUT ljk】
Cascade operation
- Definition : When modifying and deleting the primary key of the primary table , At the same time, update or delete the foreign key value from the table
- Cascade operation
- Simultaneous updating
ALTER TABLE Table name ADD CONSTRAINT Foreign key name
FOREIGN KEY ( Foreign key field name ) REFERENCES Main table name ( Main table column name )
ON UPDATE CASCADE
- At the same time to delete
ALTER TABLE Table name ADD CONSTRAINT Foreign key name
FOREIGN KEY ( Foreign key field name ) REFERENCES Main table name ( Main table column name )
ON DELETE CASCADE
- Both update and delete
ALTER TABLE Table name ADD CONSTRAINT Foreign key name
FOREIGN KEY ( Foreign key field name ) REFERENCES Main table name ( Main table column name )
ON UPDATE CASCADE
ON DELETE CASCADE
边栏推荐
- Retest the cloud native database performance: polardb is still the strongest, while tdsql-c and gaussdb have little change
- 8行代码实现快速排序,简单易懂图解!
- 数据库 事务
- promise async和await的方法与使用
- Multiparty Cardinality Testing for Threshold Private Set-2021:解读
- ARouter 最新问题合集
- 以PolarDB为代表的阿里云数据库以跻身全球第一阵营
- Livedata source code appreciation III - frequently asked questions
- A man is a Book
- 100 important knowledge points that SQL must master: insert data
猜你喜欢
微信表情符号被写入判决书,你发的每个 emoji 都可能成为呈堂证供
Handler-源码分析
Alibaba cloud database represented by polardb ranks first in the world
8 lines of code to achieve quick sorting, easy to understand illustrations!
"New digital technology" completed tens of millions of yuan of a + round financing and built an integrated intelligent database cloud management platform
以PolarDB为代表的阿里云数据库以跻身全球第一阵营
Digitalization is not a trial, but a wading out of "Xingzhi Digital China" × History of Foxconn
OceanBase 安装 yum 源配置错误及解决办法
优惠券种类那么多,先区分清楚再薅羊毛!
Alibaba cloud lifeifei: China's cloud database has taken the lead in many mainstream technological innovations abroad
随机推荐
ESP32-C3入门教程 基础篇⑫——量产烧写设备配置和序列号, NVS partition分区确认, NVS 分区生成程序, csv转bin
EMC-浪涌
win10 R包安装报错:没有安装在arch=i386
训练一个图像分类器demo in PyTorch【学习笔记】
Mathematics (fast power)
Introduction to game theory
Oceanbase installation Yum source configuration error and Solutions
The reasoning delay on iphone12 is only 1.6 MS! Snap et al. Analyzed the transformer structure latency in detail, and used NAS to find out the efficient network structure of mobile devices
R语言查看版本 R包查看版本
数学(快速幂)
语音信号处理-基础(五):傅立叶变换
考研这些“不靠谱”的经验有多害人?
Wechat Emoji is written into the judgment, and every Emoji you send may become evidence in court
线代(高斯消元法、线性基)
Train an image classifier demo in pytorch [learning notes]
SQL必需掌握的100个重要知识点:使用子查询
H3C switch emptying configuration
单片机 MCU 固件打包脚本软件
Esp32-c3 introductory tutorial basic part ⑫ - mass production burning device configuration and serial number, NVS partition confirmation, NVS partition generation program, CSV to bin
100 important knowledge points that SQL must master: using table aliases