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 is store procedure? How do they work? When do you use?
What command is used to create a database in the sql server and how?
What types of Joins are possible with Sql Server?
What is best institute to Learn DotNET And SQL in chennai?
How to create database with physical files specified in ms sql server?
Explain “row_number()” in sql server with an example?
Explain what are the authentication modes in sql server?
What is the difference between SQL notification and SQL invalidation?
Is sql server 2016 free?
Which are the new data types introduced in sql server 2008?
Can We Use Data-grids For Our Report In Ssrs?
How to find the list of fixed hard drive and free space on server?
how to invoke a trigger on demand? : Sql server database administration
How does Report Builder support Analysis Services cubes?
What is the exact numeric data type in sql?