How to write query for how many duplicate name in table in sql server [Resolved]

Posted by Jitendrasoft09 under C# on 6/26/2013 | Points: 10 | Views : 627 | Status : [Member] [MVP] | Replies : 2
Hi All,
I want to understand How to write query for how many duplicate name in table in sql server, let me know if anybody knows.

Jitendra Kumar
If my post helps you, plz mark as an answer.



Responses

Posted by: Satyapriyanayak on: 6/26/2013 [Member] [MVP] Silver | Points: 50

Up
0
Down

Resolved
SELECT name, COUNT(*) AS 'Count'
FROM emp
GROUP BY name having count(*)>1

If this post helps you mark it as answer
Thanks

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jitendrasoft09 on: 6/26/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Nice explanation with code, Thanks Satya.....

Jitendra Kumar
If my post helps you, plz mark as an answer.

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response