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 / mohit kumar singhal

Select emp.empname, emp.salary from emp right outer join (
select empname, salary from emp
group by empname, salary
having count(empname) > 1) as tbl
on emp.empname = tbl.empname

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is 5nf in normalization form?

1046


you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation

1000


What are the properties of the transaction?

1052


How to enable tcp/ip protocol on a sql server?

1215


How do I create a partition table in sql server?

1186


What are the types of dml?

1032


In my application I have a process which picks the scanned files (tif format) from a shared location and it links to application and shown on it.The actuall issue is that my process picks the file before it is completly written or scanned which results in displaying few parts of the image or incomplete image.I need to check if the file is not completly scanned or written then do not link it to application.Please help if any body tell me that how can i check that file is in written phase or locked through DTS.thanking you in advance

2012


What are the dmvs?

1074


Sql studio em braces a variety of capabilities, but will I need them all? Is there a simpler product ? : sql server management studio

954


query processing

2221


Do you know what are the ways available in sql server to execute sql statements?

1082


What is an expression in ms sql server?

1143


Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?

1128


Explain about protocol layer present in SQL server?

1296


Define left outer join?

1028