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
Write a query to find 5th highest amount paid from the customer table.
What stored by the msdb?
How can you manage sql azure security?
What does this statement do @@rowcount?
Explain what is the difference between a local and a global temporary table?
What is join and name different type of joins?
What are the different sql server versions?
What are various aggregate functions that are available?
Can group by be used without aggregate functions?
What are the differences between sql server and mysql.
When is update_statistics command used?
What is 2nf normalization form?
What is the recovery model?
Name some of the open source software that you can use in alternative to SSR?
ow to bring suspect mode datbase online from scratch