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

select * from A where empname in (select empname from A
group by empname having COUNT(*)>1)

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

1 01 101 01010

2058


what is the Ticketing tool used in Wipro technologies at Bangalore...???

8158


What are the elements of dbms?

967


How data can be copied from one table to another table?

951


What is normalization of database? What are its benefits?

1028


Why main is user defined function?

1015


What is the web service used for reporting services?

123


What is database architecture? : SQL Server Architecture

1050


How to create new databases with "create database" statements?

1026


What are the differences between left join and inner join in sql server?

1110


Explain the categories of stored procedure i.e. System stored procedure, local stored procedure, temporary stored procedure, extended stored procedure, remote stored procedure?

1053


Can You Use A Stored Procedure To Provide Data To An Ssrs Report?

145


How many types of database relationship in sql server?

1058


Explain nested join?

989


can a database be shrunk with users active? : Sql server administration

1015