0% found this document useful (0 votes)
20 views3 pages

Solve All TH Query

query

Uploaded by

pushpa kesarwani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views3 pages

Solve All TH Query

query

Uploaded by

pushpa kesarwani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

DBMS UNIT 2

SQL ASSIGNMENT 2

Solve all the query:

1. Display all the information of the EMP table?


2. Display unique Jobs from EMP table?
3. List the emps in the asc order of their Salaries?
4. List the details of the emps in asc order of the Dptnos and
desc of Jobs?
5. Display all the unique job groups in the descending order?
6. Display all the details of all ‘Mgrs’
7. List the emps who joined before 1981.
8. List the Empno, Ename, Sal, annual sal of all emps in the
asc order of Annual sal.
9. Display the Empno, Ename, job, Hiredate, Experience of all
Mgrs
10. List the Empno, Ename, Sal, Exp of all emps working
for Mgr 7369.
11. Display all the details of the emps whose Comm. Is
more than their Sal.
12. List the emps in the asc order of Designations of
those joined after the second half of 1981.

select * from emp where hiredate > ('06/30/1981') and


to_char(hiredate,'YYYY') = 1981 order by job asc;
13. List the emps along with their Exp and Daily Sal is
more than Rs.100.

select empno,ename ,job, hiredate,deptno,


round(months_between(sysdate,hiredate),2)
exp ,round(sal/30,2) as daily_sal
from emp where sal/30>100;

14. List the emps who are either ‘CLERK’ or ‘ANALYST’ in


the Desc order.

15. List the emp who are working for the Deptno 10 or20

SELECT * FROM EMP WHERE DEPTNO =10 OR DEPTNO=20;

SELECT * FROM EMP WHERE DEPTNO IN (10,20);

16. List the emps who joined on 1-MAY-81,3-DEC-81,17-


DEC-81,19-JAN-80 in asc order of seniority.

17. List the emps who are joined in the year 81.
SELECT * FROM EMP WHERE HIREDATE LIKE ‘%81’;
18. List the emps who are joined in the month of Aug
1980.
19. List the emps Who Annual sal ranging from 22000 and
45000.

You might also like