SELECT student_id FROM tuition where student_id in ( SELECT student_id FROM student_temp )上面的这个SQL语句是要选择student-id在student_temp 中的,而不是 tuition的,这样写有没有问题的?是我要得到的数据结果吗?运行
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/16 13:46:05
![SELECT student_id FROM tuition where student_id in ( SELECT student_id FROM student_temp )上面的这个SQL语句是要选择student-id在student_temp 中的,而不是 tuition的,这样写有没有问题的?是我要得到的数据结果吗?运行](/uploads/image/z/11453555-11-5.jpg?t=SELECT+student_id+FROM+tuition+where+student_id+in+%28+SELECT+student_id+FROM+student_temp+%29%E4%B8%8A%E9%9D%A2%E7%9A%84%E8%BF%99%E4%B8%AASQL%E8%AF%AD%E5%8F%A5%E6%98%AF%E8%A6%81%E9%80%89%E6%8B%A9student-id%E5%9C%A8student_temp+%E4%B8%AD%E7%9A%84%2C%E8%80%8C%E4%B8%8D%E6%98%AF+tuition%E7%9A%84%2C%E8%BF%99%E6%A0%B7%E5%86%99%E6%9C%89%E6%B2%A1%E6%9C%89%E9%97%AE%E9%A2%98%E7%9A%84%3F%E6%98%AF%E6%88%91%E8%A6%81%E5%BE%97%E5%88%B0%E7%9A%84%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%9C%E5%90%97%3F%E8%BF%90%E8%A1%8C)
SELECT student_id FROM tuition where student_id in ( SELECT student_id FROM student_temp )上面的这个SQL语句是要选择student-id在student_temp 中的,而不是 tuition的,这样写有没有问题的?是我要得到的数据结果吗?运行
SELECT student_id FROM tuition where student_id in ( SELECT student_id FROM student_temp )
上面的这个SQL语句是要选择student-id在student_temp 中的,而不是 tuition的,这样写有没有问题的?是我要得到的数据结果吗?运行后发现student_id 比student_temp 中的id还要多吖?有点疑问?
SELECT student_id FROM tuition where student_id in ( SELECT student_id FROM student_temp )上面的这个SQL语句是要选择student-id在student_temp 中的,而不是 tuition的,这样写有没有问题的?是我要得到的数据结果吗?运行
select student_id from student_temp
出来的结果是student_temp表下面所有的student_id
然后再select student_id from tultion where student_id in -
在tuition表中输出匹配到temp表中studnet_id相同值的student_id
或者说 你若temp表student_id为1的只有一个 但是tultion表中student_id为1的有N个
那么就会输出N次的student_id内容为1