Question

Introduction to Database Oracle Assingment Use any table of your choice for solving 1. Display all...

Introduction to Database

Oracle Assingment

Use any table of your choice for solving

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. Display the Empno, Ename, job, Hiredate, Exp of all Mgrs

9. List the emps along with their Exp and Daily Sal is more than Rs.100.

10. List the emps who are either ‘CLERK’ or ‘ANALYST’ in the Desc order.

make it plz also add output screnshots

Homework Answers

Answer #1

TABLE I AM USING :-

1. Display all the information of the EMP table?

 SELECT * from emp;

2. Display unique Jobs from EMP table?

 SELECT DISTINCT job FROM emp;

  

3. List the emps in the asc order of their Salaries?   

SELECT * from emp order by sal asc;

4. List the details of the emps in asc order of the Dptnos and desc of Jobs?

SELECT * from emp order by deptno asc,job desc;

5. Display all the unique job groups in the descending order?

SELECT DISTINCT job from emp order by job desc;

6. Display all the details of all ‘Mgrs’

SELECT * from emp where empno in ( SELECT mgr from emp) ;

7. List the emps who joined before 1982.   

SELECT * from emp where hiredate < (1982-01-01);

8. Display the Empno, Ename, job, Hiredate, Exp of all Mgrs   

SELECT empno,ename ,job,hiredate, months_between(sysdate,hiredate) exp from emp where empno in (SELECT mgr from emp); 

9. List the emps along with their Exp and Daily Sal is more than Rs.100.   

SELECT * from emp where (sal/30) >100;

10. List the emps who are either ‘CLERK’ or ‘ANALYST’ in the Desc order.   

SELECT * from emp where job = 'CLERK' or job = 'ANALYST' order by job desc;

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions