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 / vinay
select empname , salary
from A
where empname in (select name from A group by empname
having count(empname ) > 1)
order by empname
Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
What is use of except clause? How does it differ from not in clause?
State the difference between local and global temporary tables?
How to convert numeric values to integers in ms sql server?
What is snapshot parameter in ssrs?
How to create an identity column?
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.
Does windows server 2016 come with sql server?
What is the difference between sql server 2000 object owner and sql server 2005 schema? : sql server database administration
What is built-in function?
Explain cross join or cartesian product in sql?
What do you understand by physical_only option in dbcc checkdb?
How many types of functions are there in sql server?
What is apply operator in sql?
How do I open port 1433?
What is a select query statement in ms sql server?