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
Do you know what are the ways available in sql server to execute sql statements?
Explain how dts is used to extract, transform and consolidate data?
What is role playing dimension with two examples? : sql server analysis services, ssas
Is sql server a database?
What is difference between clustered and non clustered index?
What are the limitations/drawbacks or ssrs 2008 r2?
Why are sql functions used?
What gets stored inside msdb database?
What is the federation in sql azure?
Why use sub query in sql server and list out types of sub queries?
What are orphan records?
What is a system database and what is a user database?
What is sqlcmd?
What are the new security features added in sql server 2012? : sql server security
What are advantages of ssrs or why we should use ssrs?