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
What is 5nf in normalization form?
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
What are the properties of the transaction?
How to enable tcp/ip protocol on a sql server?
How do I create a partition table in sql server?
What are the types of dml?
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
What are the dmvs?
Sql studio em braces a variety of capabilities, but will I need them all? Is there a simpler product ? : sql server management studio
query processing
Do you know what are the ways available in sql server to execute sql statements?
What is an expression in ms sql server?
Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?
Explain about protocol layer present in SQL server?
Define left outer join?