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 / kuntal
select * from A where empname in (select empname from A
group by empname having COUNT(*)>1)
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is the difference between commit and rollback?
What is the difference between TRUNCATE and DROP?
What is tempdb in sql server?
What is dml command?
What is standby servers? Explain types of standby servers.
What are the steps to take to improve performance of a poor performing query? : sql server database administration
What is temporal table?
How to list all triggers in the database with sys.triggers in ms sql server?
i have made a project i vb.net n created a .exe of it after installing it in to any pc, the database (sql express) is not geting accesed i.e the aplication cuts the link of the database, so plz help in this matter.
Hi, I Created 3 Tables Person(PersID[prkey],Name,Email,Password), Project(ProjName,ProjID[prkey],ProjLeader,ProjManager) & ProjectInvolvement(EntryDate,ProjID[frkey],PersID[frkey],ProjDuration). For this how can i INSERT,UPDATE & DELETE Through PROCEDURE? Please Post the Answer for me. Desai.
What are the purposes of floor and sign functions?
Describe the functionalities that views support.
explain what is raid and what are different types of raid configurations? : Sql server database administration
Can you tell me about the concept of ER diagrams?
what are defaults? Is there a column to which a default can't be bound? : Sql server database administration