现在要求查询出职位的平均每个职位的名称,工资,但是要求显示的职位的平均工资高于2000。 即:按照职位先进行分组,同时统计出每个职位的平均工资 随后要求直显示哪些平均工资高于2000的职位信息 select job,avg(sal) from scott.emp; group by job havi ...
分类:
数据库 时间:
2017-10-04 14:19:59
阅读次数:
161
select ename,&column2 from scott.emp; 输入sal; /替代标量; select * from &tab; select * from scott.emp where sal> &sal ;2000 select * from scott.emp where en ...
分类:
数据库 时间:
2017-10-04 14:19:44
阅读次数:
172
IN操作符 select * from scott.emp where empno=7369 or empno=7566 or empno=7788 or empno=9999; select * from scott.emp where empno IN (7369,7566,7788,9999) ...
分类:
数据库 时间:
2017-10-04 14:15:45
阅读次数:
186
实际上所谓的多表查询指的就是从多张数据表中取出数据并且显示的一种操作。 select * from scott.emp,dept.emp 笛卡尔积存在的原因 实际: SELECT * FROM scott.emp e, scott.dept d WHERE e.deptno=d.deptno; 范例 ...
分类:
数据库 时间:
2017-10-04 14:11:22
阅读次数:
168
s select * from scott.emp where deptno=10; /显示scott.emp表中部门是10的人员信息; select * from scott.emp where deptno=‘10’; /显示scott.emp表中部门是10的人员信息; select * fro ...
分类:
其他好文 时间:
2017-10-04 14:10:56
阅读次数:
177
范例:显示所有非销售人员的工作名称以及从事同一工作雇员的月工资总和,并且要求满足从事同一工作雇员的月工资的合计大于5000,显示的结果按照月工资的合计升序排列; 第一步:查询所以人非销售人员的信息。 select * from scott.emp where job<>‘SALESMAN’; 第二步 ...
分类:
其他好文 时间:
2017-10-04 14:07:21
阅读次数:
169
问题现象: alter user scott account unlock; ERROR at line 1:ORA-01034: ORACLE not availableProcess ID: 0Session ID: 0 Serial number: 0 问题解决: 确认当前实例对不 expor ...
分类:
数据库 时间:
2017-09-28 09:58:19
阅读次数:
183
-- Create tablecreate table PriOffer_Fund( fundno varchar2(40) not null, fundname varchar2(200) not null, fundshortname varchar2(100) not null, fundbe ...
分类:
数据库 时间:
2017-09-26 16:40:40
阅读次数:
208
第一章代码 exec dbms_stats.set_table_stats(ownname=>'SCOTT',tabname=>'EMP',numrows=>100000,no_invalidate=>false);exec dbms_stats.set_index_stats(ownname=>' ...
分类:
数据库 时间:
2017-09-23 20:10:34
阅读次数:
161
--向表中插入一条记录 create or replace procedure pro_insertDept is begin insert into scott.dept values('77','dog','dog'); commit; end pro_insertDept; --执行 begi... ...
分类:
数据库 时间:
2017-09-23 13:37:47
阅读次数:
199