mysql - 将两个查询合二为一
问题描述
嗨,我是 sql 新手,我只是想征求意见,我的查询工作正常,它给了我想要的输出,但我只想在一个查询中完成我想将我的删除查询与选择查询结合起来。我真的很感激有人能教我怎么做
Delete from tblexample where RStatus = 'Done';
SELECT t3.RStatus,t1.Name,t2.gender,t1.Rnum,t1.NB,t1.fN
FROM table1 t1
INNER JOIN table2 t2
ON (t1.fN = t2.fln)
LEFT JOIN (
select * from tblexample t3
) AS t3 ON t1.NB = t3.NB where t3.RStatus is null
如果可能的话,我想在离开之前删除冷杉加入 tblexample
解决方案
推荐阅读
- python - 如何修复从网站解析正文的python代码?
- android - 警报每秒钟都响起?
- python - 如何恢复使用 Dataset API 训练的 Tensorflow 模型?
- python-3.x - Format cells based on pandas dataframe range
- selector - 赛普拉斯 - 在另一个元素中选择元素 - `within` 的选择器语法快捷方式
- reactjs - 将 React JSX 分配给变量
- spring - Spring的嵌入式MongoDB数据库是否只有内存?
- docker - Docker-compose 不读取环境变量(MYSQL_DATABASE_PASSWORD)
- c++ - 用于汇编的 C++ 中的 extern "C" 枚举
- google-apps-script - 谷歌日历列表事件,谷歌表格中未显示输出