当前位置:网站首页>现在运营想要查看所有来自浙江大学的用户题目回答明细情况,请你取出相应数据
现在运营想要查看所有来自浙江大学的用户题目回答明细情况,请你取出相应数据
2022-07-19 18:39:00 【秋生@】
(1)使用嵌套查询
select device_id,question_id,result
from question_practice_detail
where device_id =
(
select device_id from user_profile
where university='浙江大学'
)
order by question_id
(2) 使用连接查询
SELECT
q.device_id,question_id,result
from
question_practice_detail as q,user_profile as u
WHERE
q.device_id = u.device_id and university = '浙江大学'
注:使用嵌套查询的时候,可以有多种思路,比如说我们也可以用in来代替=实现语句的丰富,两者的区别是,使用相关子查询的时候可以加快代码的之执行速度,便于我们查找
边栏推荐
猜你喜欢
随机推荐
《学习的意义》(二)你生活的痛苦,也来源于你的无知
打开窗口弹启一个带有收藏链接工具…
Pytoch -- model reading and storage
Solve the problem of daily error reporting of cascader
Regular expression syntax table
Differences between IPv4 and IPv6
网络爬虫DIY解决电商数据收集难题
Scientific computing library numpy Foundation & Improvement (Understanding + explanation of important functions)
HLS介绍
npm run xx 的执行流程
06. FFmpeg之libavdevice库
Kubernetes 介绍
[概念]凯明之作Resnet+心路历程[详细]+解决退化问题+让网络变得更深成为现实
中兴首款5G手机Axon 10 Pro发布:今年上半年上市
STL 笔记(二):模板、操作符重载
STL 笔记(五):迭代器
抽丝剥茧C语言(高阶)动态内存管理+练习
The meaning of learning (II) the pain of your life also comes from your ignorance
移动端测试必备技能: adb命令和抓包
Super long distance networking scheme of fire engine in offshore wind power fire alarm system