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
Determine when to use stored procedure to complete sql server tasks?
Write down the syntax and an example for create, rename and delete index?
How to identify current user in ssrs report?
What is rs.exe utility?
What is data file in computer?
What is the primary use of the model database?
what is create database syntax? : Sql server database administration
What is database black box testing?
Explain what is the function of sql server agent windows service?
What is sql service broker?
What is an expensive query?
What are types of subqueries?
How to access the inserted record of an event?
What is bulkcopy in sql?
What is the difference between left and right outer join?