Display Employee Records having same Salary Department Wise

Write a query to display employee records having same salary department wise?
Empname Empsalary Empdep
a 1000 IT
b 1000 CSE

Showing Answers 1 - 6 of 6 Answers

Modather Seddik

  • Aug 7th, 2015
 

Code
  1. SELECT * FROM Employe WHERE [Empsalary] = 1000 AND [Empdep] = 1000

  Was this answer useful?  Yes

Sreeram

  • Jul 30th, 2016
 

Code
  1. SELECT *

  2. FROM  Employe A(nolock)

  3. WHERE EXISTS(SELECT X FROM Employe B(nolock) WHERE B.Empsalary= A.Empsalary AND B.Empdep<> A.Empdep)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions