数据库 student sc course
2015-09-10 11:47
288 查看
查询选修了软件工程课程的学生的名字 有两种方法
使用in关键字 select sname from student where sno in (select sno from sc where cno in (select cno from course where cname='软件工程'))
连接查询 select sname from student,sc,course where student.sno=sc.sno and sc.cno=course.cno and cname='软件工程'
使用in关键字 select sname from student where sno in (select sno from sc where cno in (select cno from course where cname='软件工程'))
连接查询 select sname from student,sc,course where student.sno=sc.sno and sc.cno=course.cno and cname='软件工程'
相关文章推荐
- Dos下的Sql Server操作
- 一步一步学EF系列四【升级篇 实体与数据库的映射】
- mysql里筛选生日
- mysql中IFNULL()和COALESCE()函数替代null
- PD16 Generate Datebase For Sql2008R2时报脚本错误“对象名sysproperties无效”
- mysql中文乱码问题
- C# redis 系列四
- C# redis 系列三
- MongoDB位置查询
- win10 下pl/sql连接oracle
- Oracle BIEE (Business Intelligence) 11g 11.1.1.6.0 学习(3)创建一个简单的分析
- SQL Server 存储过程
- 数据库编码的问题
- 不安装oracle客户端,pl/sql,vs链接远程oracle办法
- Mysql binlog二进制日志
- Oracle BIEE (Business Intelligence) 11g 11.1.1.6.0 学习(2)RPD资料档案库创建
- Spring 集成redis3.0.3集群管理
- Oracle BIEE (Business Intelligence) 11g 11.1.1.6.0 学习(1)安装
- [转]Sql按年份.月份.每天统计数量
- Centos6.5安装Redis