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 the various Operating system files that every SQL server 2005 database has and what is the purpose.
Why use triggers?
What is the rdl file?
What is wrong with sql server client libarary dll, ntwdblib.dll?
What are “lock” hints?
What are the aggregate and scalar functions?
How do I completely remove sql server instance?
Explain about temporary stored procedure?
Can we use where clause with group by?
How to stop log file growing too big?
what is the system function to get the current user's user id? : Sql server database administration
how can a database be repaired? : Sql server administration
What is plan freezing?
How do you rebuild an identity column?
How do I find the sql server instance name?