Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / enis ertem

Select emp.empname, emp.salary from employee emp join (
select empname, salary from employee emp
group by empname, salary
having count(empname) > 1) as tbl
on emp.empname = tbl.empname

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to Update from select query in sql server?

1062


What is the standby server?

957


How do you open a cluster administrator?

1053


How to select some specific rows from a table in ms sql server?

1008


Explain transaction server isolation?

1045


What is page-level compression?

965


How to create an multi-statement table-valued function?

999


What are the system database in sql server 2005?

1045


What is equi join with example?

1131


How does using a separate hard drive for several database objects improves performance right away?

934


What is the cpu pressure?

1043


Explain some stored procedure creating best practices or guidelines?

937


What are the tool windows in sql server management studio? : sql server management studio

1079


When would you use a before or after trigger?

909


How to provide values to stored procedure parameters in ms sql server?

1038