`
xiaoheliushuiya
  • 浏览: 403179 次
文章分类
社区版块
存档分类
最新评论

sql 语句

 
阅读更多

关于选了5门不同的课程:

考虑的因素:1、缩小范围 (缩小范围的办法有 特殊关联查询 1、在select 后 2.在from 后)

select s.stuName from student s ,(select cs2.stuId,cs2.courseId from core cs2 group by cs2.courseId,cs2.stuId ) a

where s.stuId = a.stuId having count(s.stuId)>=5;
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics