How to get unique values from column without using Distinct keyword in Oracle?

5 pts.
Tags:
Oracle
SQL
I have a table in which the column has duplicate values in it. If i need to get unique value from that column without using distinct keyword then what will be the query?


Software/Hardware used:
Oracle Sql Developer
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 4  Replies

 
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.
  • TheRealRaven
    If all you want are distinct values for the column, then SELECT that column FROM its table with a GROUP BY for that column.
    34,465 pointsBadges:
    report
  • carlosdl
    Why don't you want to use DISTINCT?

    Well, if you don't want to use it, you can use UNIQUE instead ;)  It's not standard, but in Oracle it works exactly like DISTINCT.

    Besides Raven's suggestion, you can also combine another query  which returns no rows with the UNION set operator, which will take care of removing the duplicates.
    84,720 pointsBadges:
    report
  • CharlieBrowne
    Sounds like a homework question to me
    62,385 pointsBadges:
    report
  • carlosdl
    Yes, it probably is, Charlie.
    84,720 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: