How to count the number of duplicate items in a table?

Answer Posted / lalit goyal

select count(*) from (select boss_ID,COUNT(boss_ID) as s from dbo.Employee group by boss_ID ) a where s>1

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I create a stored procedure in dbml?

687


How do you manipulate data?

666


Explain what are the restrictions that views have to follow? : SQL Server Architecture

802


How do you make a trace?

754


How do you maintain database integrity where deletions from one table will automatically cause deletions in another table?

933






What is the sql profiler?

689


How to delete duplicate rows?

710


How to maintain a fill factor in existing indexes?

704


What is query parameter in ssrs?

132


How do I run a trace in sql server?

685


Write an sql query to sort a table according to the amounts in a row and find the second largest amount.

709


List the different normalization forms?

713


What is service broker?

767


What are the components of sql server service broker?

683


How do you check sql server is up and running?

690