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
How to use copy and concatenate commands in SQL?
Does server sql treat char as a variable-length or fixed-length column?
What are the advantages of partitioning?
Suggest a method of joining two tables.
How to find out the list schema name and table name for the database?
What is cte (common table expression)?
What are the system database in sql server 2008?
What is normalization process?
What is sql collation?
Explain transaction server implicit?
Does index speed up select statements?
What is the difference between dbcc indexdefrag and dbcc reindex?
what is the different types of backups available in sql server? : Sql server database administration
What is the sql server 2000 version number?
What is lock escalation and what is its purpose?