SELECT student_id FROM tuition where student_id in ( SELECT student_id FROM student_temp )上面的这个SQL语句是要选择student-id在student_temp 中的,而不是 tuition的,这样写有没有问题的?是我要得到的数据结果吗?运行

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 03:45:15
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的,这样写有没有问题的?是我要得到的数据结果吗?运行
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