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

What are information schema views?

957


What are the different types of sub-queries?

1026


What is the chart in report?

158


What is transaction server explicit transaction?

1011


How to achieve Paging of records in SQL SERVER?

1077


What stored by the master? : sql server database administration

1083


What is index, cluster index and nonclustered index?

970


What is the stuff and how does it differ from the replace function?

1090


What are the properties of sub-query?

1060


What is Extended user-defined?

939


What is a trigger what are the advantages of trigger?

973


What is the command dbcc checkdb used for?

992


What types of replication are supported in sql server?

1048


what is an extended stored procedure? Can you instantiate a com object by using t-sql? : Sql server database administration

998


What are rest-style architecture's?

170