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

Write a query to find 5th highest amount paid from the customer table.

886


What stored by the msdb?

956


How can you manage sql azure security?

101


What does this statement do @@rowcount?

929


Explain what is the difference between a local and a global temporary table?

940


What is join and name different type of joins?

978


What are the different sql server versions?

932


What are various aggregate functions that are available?

919


Can group by be used without aggregate functions?

857


What are the differences between sql server and mysql.

1026


When is update_statistics command used?

1000


What is 2nf normalization form?

1055


What is the recovery model?

934


Name some of the open source software that you can use in alternative to SSR?

152


ow to bring suspect mode datbase online from scratch

1766