Oracle基礎練習題二

2021-08-02 07:20:44 字數 1025 閱讀 1330

--1、查詢職員表中,在20和30號部門工作的員工姓名和部門號。

select e.ename,e.deptno from emp e where e.deptno in(20,30);

-- 2、查詢職員表中,沒有管理者的員工姓名及職位,並按職位排序。

select e.ename,e.job from emp e where e.mgr is

notnull

order

by e.job desc;

-- 3、查詢職員表中,有績效的員工姓名、薪資和績效,並按工資倒序排列。

select e.ename,e.comm,e.sal from emp e where e.mgr is

notnull

order

by e.sal desc;

-- 4、查詢職員表中,員工姓名的第三個字母是a的員工姓名。

select e.ename from emp e where e.ename like

'%__a%';

--5、查詢職員表中的職員名字、職位、薪資,並顯示為如圖所示效果 :

select ename || ', ' || job || ', ' || sal out_put from emp;

--6,查詢職員表中員工號、姓名、工資,以及工資提高百分之20%後的結果。

select empno, ename, sal, sal * 1.2 salary from emp;

--7、查詢員工的姓名和工資,條件限定為:工資必須大於1200,並對查詢結果按入職時間進行排列,早入職排在前面,晚入職排在後面。

select ename, sal from emp where sal > 1200

order

by hiredate;

-- 8、查詢account部門以外的其他部門的編號、名稱以及所在地。

select deptno, dname, loc from dept where dname <> 'account';

js基礎(二) 練習題

1.求字串 現最多字元及次數 var chars dsajhdkjahdkabgadkjasdgahd var o for var i 0 i else 以及將所有字元按屬性名歸類並計數 遍歷物件 var maxnum 0 var maxchar for var k in o console.log...

練習題 基礎練習

第一題 需求 1 計算 5 個月的生活大概開銷 spending 比如 rent 房租 800.00 mealcost 吃飯 900.00 clothingcosts 買衣服 300.00 othercosts 其他費用 300.00 public class dome1 第二題 需求 2 計算 1...

Oracle練習題一

操作hr賬戶下的employees表 2.查詢工資排名第5到第10的員工資訊?1分 功能 排序 序號偽列 範圍查詢 思路 1.按照薪資降序排序 2.對查詢結果表新增需要的列 3.擷取5 10資料,select employee id,first name,salary from select e.e...