导航:首页 > 汇率佣金 > 显示emp表中佣金增加10

显示emp表中佣金增加10

发布时间:2021-06-24 14:39:25

Ⅰ 写SQL,把scott.emp表中,所有JOB为MANAGER的加薪15%

updateempsetsalary=salart*1.15wherejob='MANAGER';
commit;

commit不可省,这个是提交,否则你把你执行语句的页面关了,不能使数据更新

Ⅱ oracle数据库emp表 什么意思 里面保存的都是什么数据

1:你说的应该是scott用户下的emp表吧,我们看下emp表的表结构你就知道保存的是什么信息了。

2:emp表是employee雇员信息表 。

3:empno就是雇员的员工编号, employee number。

4:ename员工姓名, emlployee name。

5:job员工的工作是什么比如推销员,经理等。

6:mgr上级编号。

7:hiredate受雇日期。

8:sal薪金。

9:comm佣金

10:deptno部门编号。

11:emp是scott用户下的表。查询此表:select * from scott.emp。

12:假如说没有emp表,手动创建emp表。可以从其他有这个表的人那里照结构将表建立起来。

Ⅲ 创建员工表EMP和工资表SAL,通过关联修改实现将“男”员工工资提高10%,写出相应SQL语句。

CREATETABLEEMP
(
EmployeeNameNVARCHAR(32),
SexNVARCHAR(1)
)


CREATETABLESAL
(
EmployeeNameNVARCHAR(32),
SalaryINT
)
INSERTINTOEMP
SELECT'张三',
'男';

INSERTINTOEMP
SELECT'李四',
'女'

INSERTINTOSAL
SELECT'张三',
100

INSERTINTOSAL
SELECT'李四',
100

SELECT*
FROMsal

UPDATEsal
SETSalary=Salary*1.1
FROMEMPb
WHEREdbo.SAL.EmployeeName=b.EmployeeName
ANDb.Sex='男'

SELECT*
FROMsal

Ⅳ 在oracle中。在emp表中列出第6行到第10行的数据。

select*form(selectrow_number()over()c,emp.*fromemp)AwhereA.cin(6,10)

Ⅳ 在oracle中emp表:显示部门人数大于10的每个部门怎么写

SELECT D.DEPTNO, D.DNAME, COUNT(E.EMPNO)
FROM SCOTT.EMP E, SCOTT.DEPT D
WHERE E.DEPTNO = D.DEPTNO
GROUP BY D.DEPTNO, D.DNAME
HAVING COUNT(E.EMPNO) >= 5; --数字任改

Ⅵ 编写一个PL/SQL块,将emp表中的每个员工分别归到不同的部门中,第一个员工归到10部门,第二个员工归到20部

第一个问题你没说清楚,如果人数多于部门数怎么处理?
第二个:好久没写了,未测试,基本思路应该没问题
declare
cursor emp_cursor as select * from emp;--定义游标
begin
for ee in emp_cursor loop
if ee.deptno=’10’ then
update emp set salary=case when salary*1.1>5000 then 5000 else salary*1.1 end as newsalary where empno=ee.empno;
else if ee.deptno=’20’ then
update emp set salary=case when salary*1.2>5000 then 5000 else salary*1.2 end as newsalary where empno=ee.empno;

End if;
End loop;
Commit;
End;

Ⅶ 关于oracle的问题,有emp,dept,salgrade 三个表。完成以下问题。

1.显示部门号为10 的部门名、员工名和工资
select deptno, ename, sal
from emp
where deptno = 10;

2. 工资级别是什么?在表中怎么体现?
select ename, sal
from emp;

3. 显示员工BLAKE 的上级领导的姓名
select e1.ename
from emp e1
where e1.empno = (select e2.mgr
from emp e2
where e2.ename = 'BLAKE');

4.显示与scott同一部门的所有员工
select e1.*
from emp e1
where e1.deptno = (select e2.deptno
from emp e2
where e2.ename = 'scott');

5.显示工资比部门 30 的所有员工的工资高的员工的姓名、工资和部门号
select e1.ename, e1.sal, e1.deptno
from emp e1
where e1.sal >all (select e2.sal
from emp e2
where e2.deptno = 30);

6.查询与smith 部门和岗位完全相同的所有雇员
select e1.*
from emp e1
where e1.dept = (select e2.dept from emp e2 where e2.ename = 'smith')
and e1.job = (select e3.job from emp e3 where e3.ename = 'smith')

7.显示高于部门平均工资的员工的信息
select e1.*
from emp e1
where e1.sal > (select avg(e2.sal)
from emp e2
where e1.deptno = e2.deptno
group by e2.deptno);

8.查询部门工资总和高于员工工资总和1/3的部门名及工资总和
select e1.deptno, sum(e1.sal)
from emp e1
group by e1.deptno
having sum(e1.sal) > (select sum(e2.sal) / 3.0
from emp e2);

Ⅷ 在oracle中emp表:显示部门人数大于10的每个部门的最高工资怎么写

select max(sal+nvl(comm,0)),deptno
from emp
where deptno in(select deptno from emp group by deptno having count(*)>10)
group by deptno;

或是直接
select max(sal+nvl(comm,0)),deptno
from emp
group by deptno
having count(deptno)>10;

(ps:emp表中应该没有哪个部门人数大于10吧!)

阅读全文

与显示emp表中佣金增加10相关的资料

热点内容
慈善信托展望 浏览:204
债权融资计划案例解析 浏览:905
金融企业服务农村 浏览:718
操盘芝加哥外盘期货交易笔记 浏览:818
最近出事的21家金融机构 浏览:680
5加纳对换多少人民币汇率 浏览:628
比特币合约5x杠杆怎么计算 浏览:913
7月21汽油价格 浏览:734
去融资公司贷款让先给费用 浏览:684
国药控股融资租赁副总 浏览:350
常见的理财产品类型有哪些 浏览:489
贷款购车金融公司黄了怎么办 浏览:578
员工佣金如何入账 浏览:14
客人佣金收税 浏览:162
期货公司资金挪用 浏览:586
韩国keb外汇银行 浏览:246
交易开拓者画k线 浏览:295
君正集团股票涨停 浏览:536
国信期货苹果版 浏览:588
温州市民间融资管理条例考试 浏览:627