HOW TO FIND THE EMPLOYEE DETAILS WHO ARE GETTING SAME SALARY
IN EMP TABLE

Answer Posted / subbu

Query Output is :

SQL> select *from emp where sal=any( select sal from emp
group by sal having count(sal)>1);

EMPNO ENAME JOB MGR HIREDATE
SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- -------
--- ---------- ----------
7521 WARD SALESMAN 7698 22-FEB-81
1250 500 30
7654 MARTIN SALESMAN 7698 28-SEP-81
1250 1400 30
7788 SCOTT ANALYST 7566 19-APR-87
3000 20
7902 FORD ANALYST 7566 03-DEC-81
3000 20

Is This Answer Correct ?    16 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of collation sensitivity in sql server?

590


What is the server name for sql management studio?

479


How do I find sql server instance name?

512


Tell me about normalization in DBMS.

583


What is relationship? What number of sorts of relationship are there?

639






What is difference between views and stored procedures?

516


How many ways to create table-valued functions?

586


what authentication modes does sql server support? : Sql server database administration

529


How to create a store procedure with encryption?

527


What is the use of keyword with encryption. Create a store procedure with encryption?

587


What is the downside of using udf?

567


Explain the truncate command? : SQL Server Architecture

567


Explain the steps to use transact-sql cursor?

530


How to receive returning result from a query?

586


What is dbcc?

737