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 programming language would you use to create embedded functions in ssrs?
What is transaction server consistency?
What are sp_configure commands and set commands?
What are “unrepeatable reads”?
what are different types of backups available in sql server? : Sql server database administration
Explain full-text query in sql server?
What is an indice?
Explain the phases a transaction has to undergo?
Explain nested stored procedure. Syntax and an example for create nested stored procedure?
What are various ways to enhance the ssrs report?
How do I determine how many instances of sql server are installed on a computer?
How to provide default values to stored procedure parameters?
What is attribute? : sql server analysis services, ssas
What are blobs, tables, and Queues? Is SQL is the standard way to query blobs, tables, and queues?
Does union all remove duplicates?