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

How to replace given values with null using nullif()?

999


What is the name of the system variable that returns the number of rows affected by a SQL statement?

1022


Write a program using SQL queries to find a unique entry in a table.

1006


What are the 2 types of classifications of constraints in the sql server?

1133


How do you create type- insensitive operator?

1052


How to download microsoft sql server 2005 express edition?

1056


What are the types of database schema? : sql server analysis services, ssas

1146


What is an etl file?

964


What are sql azure firewall rules?

106


What are pages and extents? : SQL Server Architecture

1030


Why should we go for stored procedures? Why not direct queries?

1111


What’s the use of custom fields in report?

952


explain the storage models of olap? : Sql server database administration

972


What is a rownum?

986


What is a not null constraint?

1043