当前位置:网站首页>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);
边栏推荐
- Unity learns from spaceshooter to record the difference between fixedupdate and update in unity for the second time
- 字符设备注册常用的两种方法和步骤
- 微信小程序获取某个元素的信息(高、宽等),并将px转换为rpx。
- Tensorflow 2. Chapter 15 of X (keras) source code explanation: migration learning and fine tuning
- JSON conversion tool class
- MySQL 23 classic interview hanging interviewer
- 腾讯云免费SSL证书扩展文件含义
- 利亚德:Micro LED 产品消费端首先针对 100 英寸以上电视,现阶段进入更小尺寸还有难度
- Linux软件:如何安装Redis服务
- leetcode-241:为运算表达式设计优先级
猜你喜欢
随机推荐
简单聊聊运维监控的其他用途
leetcode-1964:找出到每个位置为止最长的有效障碍赛跑路线
NC24325 [USACO 2012 Mar S]Flowerpot
【AutoSAR 六 描述文件】
线程的启动与优先级
Redis21 classic interview questions, extreme pull interviewer
Web2.0 giants have deployed VC, and tiger Dao VC may become a shortcut to Web3
Nc20806 District interval
Markdown tutorial
logback配置文件
Introduction of UART, RS232, RS485, I2C and SPI
[daily training] 871 Minimum refueling times
pod生命周期详解
1.12 - Instructions
Basic use of shell script
【Pulsar文档】概念和架构/Concepts and Architecture
University of Oslo: Li Meng | deep reinforcement learning based on swing transformer
可下载《2022年中国数字化办公市场研究报告》详解1768亿元市场
Free we media essential tools sharing
Multiprocess programming (I): basic concepts









