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 / goutam dey

select empname,salary from tableA
groupby empname
having count(empname)>1

Is This Answer Correct ?    3 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various Operating system files that every SQL server 2005 database has and what is the purpose.

1066


Why use triggers?

1017


What is the rdl file?

138


What is wrong with sql server client libarary dll, ntwdblib.dll?

1044


What are “lock” hints?

1065


What are the aggregate and scalar functions?

1070


How do I completely remove sql server instance?

1107


Explain about temporary stored procedure?

1031


Can we use where clause with group by?

906


How to stop log file growing too big?

1019


what is the system function to get the current user's user id? : Sql server database administration

1030


how can a database be repaired? : Sql server administration

980


What is plan freezing?

977


How do you rebuild an identity column?

951


How do I find the sql server instance name?

971