To find the simplest SQL statement that return the duplicate values for a given column and the count of their occurrences in an Oracle database table, see below
SELECT table_field, COUNT(table_field) AS dup_countit will retrieve the feildID and it's duplication count.
FROM table_name
GROUP BY table_field
HAVING (COUNT(table_field) > 1);
No comments:
Post a Comment