时间:2021-07-01 10:21:17 帮助过:4人阅读
多表联合查询
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查询(七)
标签:nbsp and class http font src 命令 信息 rom