亚洲AV日韩AⅤ综合手机在线观看,激情婷婷久久综合色,欧美色五月婷婷久久,久久国产精品99久久人人澡

  • <abbr id="uk6uq"><abbr id="uk6uq"></abbr></abbr>
  • <tbody id="uk6uq"></tbody>
  • oracle數(shù)據(jù)庫面試筆試試題總結(jié)

    時(shí)間:2021-03-16 11:02:38 綜合指導(dǎo) 我要投稿

    oracle數(shù)據(jù)庫面試筆試試題總結(jié)

      Oracle數(shù)據(jù)庫

    oracle數(shù)據(jù)庫面試筆試試題總結(jié)

      1.基礎(chǔ)測(cè)試

      選擇在部門 30 中員工的所有信息

      Select * from emp where deptno=30;

      列出職位為(MANAGER)的員工的編號(hào),姓名

      Select empno,ename from emp where job = ?Manager ?;

      找出獎(jiǎng)金高于工資的員工

      Select * from emp where comm>sal;

      找出每個(gè)員工獎(jiǎng)金和工資的總和

      Select sal+comm,ename from emp;

      找出部門 10 中的經(jīng)理(MANAGER)和部門 20 中的普通員工(CLERK)

      Select * from emp where (deptno=10 and job=?MANAGER?) or (deptno=20 and job=?CLERK?);

      找出部門 10 中既不是經(jīng)理也不是普通員工,而且工資大于等于 2000 的員工 Select * from emp where deptno=10 and job not in(?MANAGER?,?CLERK) ? and sal>=2000;

      找出有獎(jiǎng)金的員工的'不同工作

      Select distinct job from emp where comm is not null and comm>0

      找出沒有獎(jiǎng)金或者獎(jiǎng)金低于 500 的員工

      Select * from emp where comm<500 or comm is null;

      顯示雇員姓名,根據(jù)其服務(wù)年限,將最老的雇員排在最前面

      select ename from emp order by hiredate ;

      2.函數(shù)測(cè)試

      找出每個(gè)月倒數(shù)第三天受雇的員工(如:2009-5-29)

      select * from emp where last_day(hiredate)-2=hiredate;

      找出 25 年前雇的員工

      select * from emp where hiredate<=add_months(sysdate,-25*12);< p="">

      所有員工名字前加上 Dear ,并且名字首字母大寫

      select Dear || initcap(ename) from emp;

      找出姓名為 5 個(gè)字母的員工

      select * from emp where length(ename)=5;

      找出姓名中不帶 R 這個(gè)字母的員工

      select * from emp where ename not like %R%;

      顯示所有員工的姓名的第一個(gè)字

      select substr(ename,0,1) from emp;

      顯示所有員工,按名字降序排列,若相同,則按工資升序排序

      假設(shè)一個(gè)月為 30 天,找出所有員工的日薪,不計(jì)小數(shù)

      找到 2 月份受雇的員工

      select * from emp where to_hiredate,fmmm)=2;

      3.分組函數(shù)

      分組統(tǒng)計(jì)各部門下工資>500 的員工的平均工資、

      Select avg(sal) from emp where sal>500 group by deptno ;

      統(tǒng)計(jì)各部門下平均工資大于 500 的部門

      select deptno,avg(sal) from emp group by deptno having avg(sal)>500 ; 算出部門 30 中得到最多獎(jiǎng)金的員工獎(jiǎng)金

      Select max(comm) from emp where deptno = 30 ;

      算出部門 30 中得到最多獎(jiǎng)金的員工姓名

      select ename from emp where comm = (select max(comm) from emp where deptno=30);

      算出每個(gè)職位的員工數(shù)和最低工資

      Select job,min(sal),count(*) from emp group by job;

      列出員工表中每個(gè)部門的員工數(shù),和部門 no

      Select count(*),deptno from emp group by deptno;

      得到工資大于自己部門平均工資的員工信息

      select * from emp e1,(select deptno,avg(sal) as avgsal from emp group by deptno) e2

      where e1.deptno=e2.deptno and e1.sal > e2.avgsal;

      分組統(tǒng)計(jì)每個(gè)部門下,每種職位的平均獎(jiǎng)金(也要算沒獎(jiǎng)金的人)和總工資(包括獎(jiǎng)金) select deptno,job,avg(nvl(comm,0)),sum(sal+nvl(comm,0)) from emp group by deptno,job;

      4.多表聯(lián)查

      列出員工表中每個(gè)部門的員工數(shù),和部門 no

      select deptno,count(*) from emp group by deptno;

      列出員工表中每個(gè)部門的員工數(shù)(員工數(shù)必須大于 3) ,和部門名稱

      select d.* ,ed.cou from dept d,(select deptno,count(*) cou from emp group by deptno having count(*)>3) ed where d.deptno=ed.deptno;

      找出工資比 jones 多的員工

      select * from emp where sal>=(select sal from emp where

      lower(ename)=jones);

      列出所有員工的姓名和其上級(jí)的姓名

      select e1.ename as lower ,e2.ename as upper from emp e1,emp e2 where e1.mgr

      = e2.empno;

      select e1.ename as lower ,e2.ename as upper from emp e1,emp e2 where e1.mgr = e2.empno(+);

      以職位分組,找出平均工資最高的兩種職位

      Select * from ( select avg(sal) from emp order by job desc ) where rownum<3; 20="" select="" d.dname="" from="" emp="" dept="" d="" where="" and="" e.sal="">(select max(sal) from

      emp where deptno=20) and e.deptno=d.deptno

      得到平均工資大于 2000 的工作職種

      select job from emp group by job having avg(sal) > 2000;

      分部門得到工資大于 2000 的所有員工的平均工資,并且平均工資還要大于 2500 select deptno,avg(sal) from emp where sal>2000 group by deptno having avg(sal)>2500;

      得到每個(gè)月工資總數(shù)最少的那個(gè)部門的部門編號(hào),部門名稱,部門位置 select * from dept

      where

      deptno = (

      select e.deptno from

      (select deptno,sum(sal) from emp group by deptno order by sum(sal)) e

      where rownum=1

      );

    【oracle數(shù)據(jù)庫面試筆試試題總結(jié)】相關(guān)文章:

    數(shù)據(jù)庫面試筆試題06-26

    數(shù)據(jù)庫常見筆試面試題07-26

    面試筆試題03-22

    有關(guān)面試的筆試題09-03

    護(hù)士面試筆試題09-03

    華為面試筆試題08-19

    人事面試筆試題08-14

    電廠面試筆試題目07-12

    中專面試筆試題目07-12

    面試筆試題庫03-22