大家好,我是考100分的小小码 ,祝大家学习进步,加薪顺利呀。今天说一说mysql查询(七)「终于解决」,希望您对编程的造诣更进一步.
查询学过「张三」老师授课的同学的信息
多表联合查询
and(和)
第一种:
命令:select ex_xueshengbiao_95.Sid,ex_xueshengbiao_95.Sname,ex_xueshengbiao_95.Sage,ex_xueshengbiao_95.Ssex
from ex_xueshengbiao_95,ex_kechengbiao_95, ex_jiaoshibiao_95,ex_chengjibiao_95
where ex_kechengbiao_95.Tid=ex_jiaoshibiao_95.Tid
and ex_kechengbiao_95.Cid=ex_chengjibiao_95.Cid
and ex_chengjibiao_95.Sid=ex_xueshengbiao_95.Sid
and ex_jiaoshibiao_95.Tname=‘张三‘
(2)第二种
命令:select * from ex_xueshengbiao_95
where Sid in (select Sid from ex_chengjibiao_95
where Cid in (select Cid from ex_kechengbiao_95
where Tid in (select Tid from ex_jiaoshibiao_95
where Tname=‘张三‘)))
mysql查询(七)
原文地址:https://www.cnblogs.com/zgqbky/p/13427386.html
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
转载请注明出处: https://daima100.com/6902.html