How to count the number of duplicate items in a table?
Answers were Sorted based on User's Feedback
Answer / mr.abdul rahim
select count(column), column from table group by column
having count(column) > 1
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / pavan
Hi,
try this query.In this query sal one val is duplicated
4items
select sal,count(sal) from test group by sal having count
(*)>1
Is This Answer Correct ? | 4 Yes | 4 No |
Answer / 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 |
What does the on delete cascade option do?
Which is better in performance - CONSTRAINT or TRIGGER over a column which restricts say an input of particular value in a column of a table?
How do I edit a stored procedure in sql server?
what is raid and what are different types of raid configurations? : Sql server database administration
What is it unwise to create wide clustered index keys?
How to Execute an Operating System Command From Within SQL Server ?
What are the types of indexes available with SQL Server?
What is the default Port No on which SQL Server listens?
What is the purpose of using COLLATE in a query?
Explain what is use of dbcc commands?
Plz tell about backup&recovery?
Define constraints and give an example of their use?