I have table name employee with attributes like eno,ename dno,salary. My problem is that i need select complete information of the emloyee's when employee getting same salary in same depatment.
Eg: I have the table like this eno ename dno salary1 Noor D10 10000.502 Ahmed D20 20000.753 jaya D30 15000.654 hema D10 10000.505 rupa D20 20000.756 prabha D40 20000.757 lalitha D40 12000.758 vetri D40 12000.75
and i need the output as fallowseno ename dno salary1 Noor D10 10000.504 hema D10 10000.507 lalitha D40 12000.758 vetri D40 12000.752 Ahmed D20 20000.755 rupa D20 20000.75
so I written the query like thisSELECT * FROM employeewhere dno in(SELECT dno FROM employee group by dno,salary having count(dno)>1) and salary in(SELECT salary FROM sub group by dno,salary having count(salary)>1)
but i got the output as fallowseno ename dno salary1 Noor D10 10000.504 hema D10 10000.507 lalitha D40 12000.758 vetri D40 12000.752 Ahmed D20 20000.755 rupa D20 20000.756 prabha D40 20000.75
so plz somebody help me to get the output what i need........Noor AhmedKeysoft solution