内联接 查询两个或多个表共有的部分
select stuName,claName,stuSubjectName,stuScore from studentScore inner join stuClass on stuClass = claID inner join studentsubject on stusubject = subID
--左外联接 查询两个或多个表共有的部分以及主表内容
select * from studentScore left join stuClass on stuClass =claID
--右外联接 查询两个或多个表共有部分以及副表内容
select * from studentScore right join stuClass on stuClass = claID
---交叉联接(笛卡尔积)把所有内容相乘
select * from studentScore cross join stuClass
阅读(1260) | 评论(0) | 转发(0) |