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
How do you truncate?
What is procedure explain with program?
What is pl sql block in dbms?
what is isam? : Sql dba
what is self-join? : Sql dba
Can you call pl/sql package functions from within a fast formula?
Show code of a cursor for loop.
What is the difference between cross join and natural join?
What are string functions in sql?
how to analyze tables with 'mysqlcheck'? : Sql dba
What are pl sql procedures?
What is sp_helptext?
What is trigger in sql?
What is the use of function "module procedure" in pl/sql?
Is sql a microsoft product?