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 |
Does index slows down insert statements?
How to edit table in sql server 2017?
What are the advantages to use stored procedures?
After creating the cube, if we added a new column to the oltp table then how you add this new attribute to the cube? : sql server analysis services, ssas
i want to join two queries....and i want to run them as one after another that is want output of first query then second , then again output of first query then second and so on...
When would you use sql joins?
How to convert a numeric expression from one data type to another?
Does group by or order by come first?
What are the operating modes in which database mirroring runs?
How do you read transaction logs
I have student marks in a student table. I need second highest mark .Then what will the query for this?
37 Answers NetCore, Patni, SAP Labs, Temenos, Wipro,
1.Describe way(s) to tune the SQL table in order to optimize performance. 2. Explain SQL Injection and how can you prevent them?
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)