sql题练习2

sql题练习2

 

1.  找出收取佣金的员工的不同工作. 

select job from emp where comm is notnull

2.  找出不收取佣金或收取的佣金低于100的员工. 

select job from emp where comm is nullor comm<100

3.  找出各月倒数第3天受雇的所有员工. 

select * from emp wherehiredate=to_date(to_char(add_months(hiredate,1),'yyyy-mm'),'yyyy-mm')-3;

4.  找出早于12年前受雇的员工.

select * from emp where extract(year fromsysdate)-extract(year from hiredate)>12

5.  以首字母大写的方式显示所有员工的姓名.

select initcap(ename) from emp     

 

(0)
上一篇 2022年3月21日
下一篇 2022年3月21日

相关推荐