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
1 01 101 01010
what is the Ticketing tool used in Wipro technologies at Bangalore...???
What are the elements of dbms?
How data can be copied from one table to another table?
What is normalization of database? What are its benefits?
Why main is user defined function?
What is the web service used for reporting services?
What is database architecture? : SQL Server Architecture
How to create new databases with "create database" statements?
What are the differences between left join and inner join in sql server?
Explain the categories of stored procedure i.e. System stored procedure, local stored procedure, temporary stored procedure, extended stored procedure, remote stored procedure?
Can You Use A Stored Procedure To Provide Data To An Ssrs Report?
How many types of database relationship in sql server?
Explain nested join?
can a database be shrunk with users active? : Sql server administration