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
What are the different types of collation sensitivity in sql server?
What is the server name for sql management studio?
How do I find sql server instance name?
Tell me about normalization in DBMS.
What is relationship? What number of sorts of relationship are there?
What is difference between views and stored procedures?
How many ways to create table-valued functions?
what authentication modes does sql server support? : Sql server database administration
How to create a store procedure with encryption?
What is the use of keyword with encryption. Create a store procedure with encryption?
What is the downside of using udf?
Explain the truncate command? : SQL Server Architecture
Explain the steps to use transact-sql cursor?
How to receive returning result from a query?
What is dbcc?