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 / goutam dey
select empname,salary from tableA
groupby empname
having count(empname)>1
| Is This Answer Correct ? | 3 Yes | 7 No |
Post New Answer View All Answers
What are logical/boolean operations in ms sql server?
What is buffer cash and log cache in sql server?
explain what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration
What is sql server programming?
What is temporal table?
What is sqlservr.exe - process - sql server (sqlex?press)?
What are orphan records?
What is it unwise to create wide clustered index keys?
What are cascading parameters in ssrs reports?
What is inner join in sql server joins?
What are trace flags?
What are clustered and non-clustered index?
What is a hint?
how can a database be repaired? : Sql server administration
What is the difference between for auto and for nested?