Duplicate values in an Oracle database

1145795 pts.
Tags:
Oracle Database
SQL statements
Is there a SQL statement that would return duplicate values for a given column / count of their occurrences in an Oracle database? Thank you very much.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

you can try with group by clause as follows:

select <col_A> from <table_name> group by <col_A> having count(*) > 1;

this will give the duplicate values for column A. Hope this helps.

Vijay

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • AjitK29
    Try below query :

    select column_name, count(column_name)
    from table
    group by column_name
    having count (column_name) > 1;

    2,545 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: