当前位置:网站首页>mysql 多表联合删除
mysql 多表联合删除
2022-07-03 00:01:00 【开心大爆炸】
delete from A WHERE A.name in (SELECT name FROM B WHERE TIMESTAMPDIFF(DAY,time,NOW()) >= 30);//B表中插入数据与现在时间相比超过三十天的,,删除A表中对应的数据
delete from C WHERE C.task_name in (SELECT name FROM B WHERE TIMESTAMPDIFF(DAY,time,NOW()) >= 30);//B表中插入数据与现在时间相比超过三十天的,,删除C表中对应的数据
delete from B where TIMESTAMPDIFF(DAY,time,NOW()) >= 30);
边栏推荐
- NC24840 [USACO 2009 Mar S]Look Up
- helm 基础学习
- Rust字符串切片、结构体和枚举类
- Lex & yacc & bison & flex configuration problems
- mm中的GAN模型架构
- Multiprocess programming (II): Pipeline
- University of Toronto:Anthony Coache | 深度强化学习的条件可诱导动态风险度量
- Redis21 classic interview questions, extreme pull interviewer
- 关于QByteArray存储十六进制 与十六进制互转
- 数组常用操作方法整理(包含es6)及详细使用
猜你喜欢
随机推荐
The most painful programming problem in 2021, adventure of code 2021 Day24
Kubernetes simple introduction to writing YML
Automated defect analysis in electronic microscopic images
百度智能云牵头打造智能云综合标准化平台
【AutoSAR 六 描述文件】
【案例分享】让新时代教育发展与“数”俱进
NC50965 Largest Rectangle in a Histogram
pod生命周期详解
Tensorflow 2. Chapter 15 of X (keras) source code explanation: migration learning and fine tuning
helm 基础学习
About qbytearray storage hexadecimal and hexadecimal conversion
Hundreds of continuous innovation to create free low code office tools
Web2.0的巨头纷纷布局VC,Tiger DAO VC或成抵达Web3捷径
【AutoSAR 十 IO架构】
文件操作IO-Part2
Vulkan performance and refinement
node_ Modules cannot be deleted
微信小程序获取某个元素的信息(高、宽等),并将px转换为rpx。
leetcode-241:为运算表达式设计优先级
Redis21 classic interview questions, extreme pull interviewer