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 / anand

select empname,salary from tableA where(empname in (select
empname from tableA group by empname having count(empname)
>1))order by empname

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is apply operator in sql?

1047


Distinguish between nested subquery and correlated subquery?

1115


Explain about builtinadministrator?

1117


What is the recovery model?

1062


Why transaction is important?

1024


What is 2nf in normalization?

1058


How can delete duplicate records in cte in sql server?

1018


Is it possible to import data directly from t-sql commands without using sql server integration services? If so, what are the commands?

1455


explain declarative management framework (dmf) in sql server 2008?

1044


Do you know what is a with(nolock)?

1104


Explain the different index configurations a table can have?

995


What do you mean by tablesample?

1127


Can we write a distributed query and get some data which is located on other server and oracle database?

1280


Hi, I Created 3 Tables Person(PersID[prkey],Name,Email,Password), Project(ProjName,ProjID[prkey],ProjLeader,ProjManager) & ProjectInvolvement(EntryDate,ProjID[frkey],PersID[frkey],ProjDuration). For this how can i INSERT,UPDATE & DELETE Through PROCEDURE? Please Post the Answer for me. Desai.

1898


Tell me what are cursors and when they are useful?

995