View Single Post
Old 10-03-08, 02:22 PM   #2 (permalink)
ketan_kashyap@yahoo.co.in
Junior Member
 
Join Date: Mar 2008
Age: 26
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1 ketan_kashyap@yahoo.co.in is on a distinguished road
Re: Sql - I have a table with duplicate names in it. Write me a query which returns only duplicate rows with number of times they are repeated.

Quote:
Originally Posted by radhika_btech View Post
Sql - I have a table with duplicate names in it. Write me a query which returns only duplicate rows with number of times they are repeated.
select name, count(name)
from table_name
group by name
having count(name) > 1

Last edited by ketan_kashyap@yahoo.co.in; 10-03-08 at 02:24 PM. Reason: mistake
ketan_kashyap@yahoo.co.in is offline   Reply With Quote