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 can be used instead of trigger?
1.What is the deferece between DBMS & RDBMS? 2.How can you trouble shoot? If u will get error while installing sql server? 3.How can u trouble shoot slow running query? 4.how can u trouble log shipping errors? 5.why do we use merge replication instead of T.log replication?
what does the automatic recovery do? : Sql server administration
How to define the name and server for a new dsn?
Can we call future method from trigger?
How will you collect the date from current date to last older 6 days date in sql server 2005
How to transfer an existing table from one schema to another schema in ms sql server?
What are explicit and implicit transactions?
What meant by Performance Tuning,how can we do the performance tuning on stored procedures and tell some steps to do the performance tuning
Explain Active/Active and Active/Passive cluster configurations
Can two different columns be merged into single column? Show practically?
What is normalization? Explain different forms of normalization?