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 kind of problems occurs if we do not implement proper locking strategy?
Do you know what is blocking?
Define right outer join?
What are the properties of the transaction?
What does the update command do?
Define normalisation?
What is the difference between rank and dense_rank?
Explain difference between cross join and full outer join?
What is row_number()?
What are system databases in ms sql server?
What is difference between delete & truncate commands?
How many replicas are maintained for each sql azure db?
What is database replication?
How to assign null values to variables or columns?
What is identity?