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 |
explain different types of constraints? : Sql server database administration
How to choose all records from the table?
Can you force a query to use a specific index?
How to maintain a fill factor in existing indexes?
How are SQL Server databases physically stored under Windows 2000?
How can I create a table from another table without copying any values from the old table?
Explain about SQL server 2005?
Can we have more than one NULL in a column having unique constraint?
what is denormalization? : Sql server database administration
What is raiseerror? What is raiseerror?
What is the cpu pressure?
Where in ms sql server is ’100’ equal to ‘0’?
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)