What is the Query to print out the individual total number of
duplicate row in sql.
Answer Posted / girija.112
ANS:
SELECT department_id,COUNT(department_id) AS "Occurrences"
FROM departments
GROUP BY department_id
HAVING ( COUNT(department_id) > 1 )
DEPARTMENT_ID Occurrences
------------- -----------
80 2
60 3
--In my 'departments' table , i have not assigned department_id column as a "primary key / unique key"
| Is This Answer Correct ? | 28 Yes | 3 No |
Post New Answer View All Answers
What is a nested table in word?
What does fetching a cursor do?
what are the differences between procedure-oriented languages and object-oriented languages? : Sql dba
How do you take the union of two tables in sql?
what are the advantages and disadvantages of cascading style sheets? : Sql dba
Is stored procedure faster than query?
How can you save or place your msg in a table?
what are the type of locks ? : Sql dba
Which is faster union or join?
What is the use of non clustered index?
What programs use sql?
What is meant by truncate in sql?
What is set serveroutput on?
what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba
Do ddl statements need commit?