You are on page 1of 2

1) Display all the details of the employees as per the salaries in asc order ?

A) select * from emp order by sal asc;

2) Display all the details of the employees information who joined before 81 ?

A) select * from emp where hiredate < '01-JAN-81';

3) Display all the employees numbers ,employee name ,sal,dailysal of all the
employees in the ascending order as per the annual salary?
A) select empno,ename,sal,sal/30,sal*12 from emp order by empno,ename,sal ,
sal/30,sal*12 asc ;

4) Display all the employee details whose comm is more than salary ?

A) select * from emp where comm > Sal;

5) write all the employee details who are clerk and analyst ?

A) select * from emp where job in ('CLERK' , 'ANALYST');

6) Display the employees who joined on 01-MAY-81,03-DEC-81,17-DEC-81,19-JAN-80


in ascending order ?
A) select * from emp where hiredate in ('01-MAY-81','03-DEC-81','17-DEC-81','19-
JAN-80')
order by hiredate;
7) Display enames those who have five characters in their name ?

A) select ename from emp where ename like '_____';

8) Display the employees whose salary is 4 digits and ends with ZERO ?

A) select * from emp where sal like '___0';

9) Display all the clerks of deptno 20 info ?

A) select * from emp where job in ('CLERK') and deptno = 20;

10) Display the Query in below format


'SMITH IS EARNING 800' ?
A) Select ename|| 'IS EARNING' || sal from emp;

11) list the employees of deptno 30 or deptno 10 joined in the year 81 ?

A) select * from emp where deptno in (10,30) and hiredate between '01-JAN-81' and
'31-DEC-81';

12) Display the details of the employees in ascending order of the deptno's
descending order of jobs ?

A) select * from emp order by deptno,job desc;

13) WAQTD employee number,employee name ,sal of all working for MGR 7839 ?

A) select empno,ename,sal from emp where mgr=7839;

14) WAQTD employee names who joined in DEC-82 ?


A) select ename from emp where hiredate between '01-DEC-82' AND '31-DEC-82';

15) WAQTD all the employee details who is earning comm ?

A) select * from emp where comm is not null;

You might also like