Oracle数据库作业-5 查询】的更多相关文章

33. 查询成绩比该课程平均成绩低的同学的成绩表. select * from score a where a.degree between 0 and( select avg(degree) from score b   where a.cno=b.cno ) 34. 查询所有任课教师的Tname和Depart. select tname,depart from teacher where tno in( select tno from course ) 35 . 查询所有未讲课的教师的Tna…
23.查询"张旭"教师任课的学生成绩. select * from score s where cno in ( select cno from course where tno in( select tno from teacher where tname = '张旭')) 24.查询选修某课程的同学人数多于5人的教师姓名. select tname from teacher where tno in ( select tno from course where cno in ( s…
14.查询所有学生的Sname.Cno和Degree列. select t.sname,c.cno,c.degree from student t inner join score c on t.sno=c.sno…
9. 查询"95031"班的学生人数.…
1. 查询Student表中的所有记录的Sname.Ssex和Class列.…
ASP.NET操作ORACLE数据库之模糊查询 一.ASP.NET MVC利用OracleHelper辅助类操作ORACLE数据库 //连接Oracle数据库的连接字符串 string connectionString = @"Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP) (HOST=localhost) (PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=TestDB))); User…
oracle数据库经典SQL查询 .查看表空间的名称及大小 select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size from dba_tablespaces t, dba_data_files d where t.tablespace_name = d.tablespace_name group by t.tablespace_name; .查看表空间物理文件的名称及大小 select tablespace_name, …
本文来源:huang_xw 的<Oracle数据库的状态查询> 1 状态查询 启动状态 SQL语句 结果 nomount select status from v$instance; STARTED select open_mode from v$database; ERROR at line 1: ORA-01507: database not mounted mount select status from v$instance; MOUNTED select open_mode from…
参考文档:http://database.51cto.com/art/201108/288058.htm Oracle数据库日期范围查询有两种方式:to_char方式和to_date方式,接下来我们通过一个实例来介绍这一过程.我们假设要查询2011-05-02到2011-05-30之间的数据,实现方式如下: to_date方式: select * from tablename where time>= to_date('2011-05-02','yyyy-mm-dd') and time<=t…
一.涉及内容 1.掌握SELECT语句的多表连接查询. 2.掌握SELECT语句的子查询. 二.具体操作 (一)根据Oracle数据库scott方案下的emp表和dept表,完成下列操作: 1.查询所有工种为CLERK的员工的姓名及其部门名称. select ename,dname from scott.emp t1 inner join scott.dept t2 on t1.deptno=t2.deptno where job='CLERK'; 2.查询所有部门及其员工信息,包括那些没有员工…