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

What is star, snowflake and star flake schema? : sql server analysis services, ssas

652


What is meant by dirty read?

554


what are the basic functions for master, msdb, model, tempdb and resource system databases? : sql server database administration

563


What are the different types of join?

562


when you create a database how is it stored? : Sql server database administration

491






Why use triggers?

568


What are pages and extents? : SQL Server Architecture

555


How many tables can be joined in SQL Server?

590


What happens if the update subquery returns multiple rows in ms sql server?

586


What does executeupdate return?

537


What is the difference between a stored procedure and a user defined function?

539


What is b tree index?

511


What is the difference between for xml raw and for xml auto?

561


Can a table be moved to different filegroup?

568


Why use stored procedures in sql server?

554