摘要: 首先需要的建立表数据如下: 方案一: select * from (select s.sname,count(*) num from student s,sc sc1,course c where s.sno=sc1.sno and c.cno=sc1.cno group by s.sno) res 阅读全文
posted @ 2018-01-11 02:36 Booker808 阅读(357) 评论(0) 推荐(1) 编辑
摘要: 准备数据 我们先介绍下使用的3个数据表: student数据表: course数据表: sc数据表: EXISTS EXISTS代表存在量词∃。带有EXISTS谓词的子查询不返回任何数据,只产生逻辑真值“true”或者逻辑假值“false”。 一个例子1.1: 要求:查询选修了课程”操作系统“的同学 阅读全文
posted @ 2018-01-11 00:28 Booker808 阅读(9292) 评论(0) 推荐(1) 编辑