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
How sql server enhances scalability of the database system?
What is the difference between value type and reference type?
Define left outer join?
What is usually the first word in a sql query?
What are different types of statement?
Define normalisation?
When I run the sql server 2000 setup, it just hangs. What do I do?
What is the use of for clause?
What stored by the model?
Can you move the resources after pausing the node? : sql server database administration
What is sql server profiler trace data file?
What does sql server mean?
Is foreign key unique?
What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration
What are the different acid properties?