以问题驱动的方式来讲解
查询成绩表中存在不及格课程的学生姓名,所有课程名和成绩信息
刚开始上来就敲了这个
只显示成绩小于60的课程,不是所有课程,这时就用到表的自身连接了
表的自身连接就是产生2个表的笛卡尔积
就是上图最后6行的数据
有重复的语句所以要去重
完成
再来个例子,具体的原理就不讲了
查询每一门课的先修课的先修课
course表有2列con(课程号),cpno(先修课程号)
wx6289ced28e34b 博主文章分类:数据库 ©著作权
以问题驱动的方式来讲解
查询成绩表中存在不及格课程的学生姓名,所有课程名和成绩信息
刚开始上来就敲了这个
只显示成绩小于60的课程,不是所有课程,这时就用到表的自身连接了
表的自身连接就是产生2个表的笛卡尔积
就是上图最后6行的数据
有重复的语句所以要去重
完成
再来个例子,具体的原理就不讲了
查询每一门课的先修课的先修课
course表有2列con(课程号),cpno(先修课程号)
上一篇:Qt练习
最优路由条目优先
Mysql 表连接的原理搞后端的肯定要经常接触到数据库,搞数据库一个避免不了的地方就
什么是连接查询?笛卡尔积如何避免?内连接和外连接的概念是什么?表连接的原理是什么?Simple Nested-Loop Join、In
<br /><br />Oracle 表之间的连接分为三种:<br />1. 内连接(自然连接)<br />2. 外连接<br /
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M