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 is normalization according to you and explain its different levels?
What are .mdf files?
What is meant by indexing?
What is a transaction and what are ACID properties?
14 Answers Config Systems, IBM, TCS, Virtusa,
How to get a list of columns in a view using the "sp_columns" stored procedure?
Do you know sql server 2008 introduces automatic auditing?
In clustered and non clustered indexes which one is faster while executing a query ?
What is shared lock?
What is the maximum size per database for sql server express?
What is logshipping and its purpose?
What stored procedure would you use to view lock information?
What is a trigger what are the advantages of trigger?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)