SQL Server Query: Select duplicate records using group by and having clause
This query is very important for Dotnet developers for facing SQL Server Interview Questions. If we have duplicate employee names in the employees table, we have to find out employee names who are having same names.Below query will help in this regards,
SELECT [ename] FROM [Rajesh].[dbo].[employeeMaster] group by ename having COUNT(*)>1
Any other queries, please write in comments.
Post a Comment
Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.