Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 select duplicate entries

Author  Topic 

kote_alex
Posting Yak Master

112 Posts

Posted - 2009-05-28 : 04:32:16
how can i select and see the multiple entries in the name column ... because I need to see their Id's .
could I make a select for this application?

slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2009-05-28 : 05:18:18
select id, column
from table
having count(id) > 1
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-05-28 : 05:21:47

select t1.id,t2.name from table as t1 inner join
(
select name from table
group by name
having count(*)>1
) as t2
on t1.name=t2.name


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -