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 primary key sql?
How many types of keys are there in sql?
What is sql architecture?
Does sql full backup truncate logs?
What is the difference between database trigger and stored procedure?
Explain scalar functions in sql?
What is mdb stand for?
Which is faster count (*) or count 1?
How do I run a program in pl sql?
What will you get by the cursor attribute sql%rowcount?
What does pragma mean?
Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?
Which is the correct statement about truncate and delete?
Can we enter data in a table in design view?
Can we rollback truncate?