Hi,
I have a table A which has four rows as follows
Table A
-------
empname salary
------- ------
A 1000
B 2000
C 3000
A 1000
B 2000
D 5000
I need the following output:
empname salary
------- ------
A 1000
A 1000
B 2000
B 2000
Thanks in advance
Answer Posted / enis ertem
Select emp.empname, emp.salary from employee emp join (
select empname, salary from employee emp
group by empname, salary
having count(empname) > 1) as tbl
on emp.empname = tbl.empname
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are secondary xml indexes?
Define right outer join in sql server joins?
Determine when to use stored procedure to complete sql server tasks?
What is the difference between functions and scalar functions?
Which database stores information about replication?
Explain how many types of relationship?
What are sub reports?
Is null vs coalesce?
What does dml stand for?
What are the different types of replication are there in sql server 2000?
How to concatenate two character strings together?
How do I schedule a sql server profiler trace?
what data regions are and what are the different data regions?
How to assign new column names in a view?
how to invoke a trigger on demand? : Sql server database administration