Quantcast
Channel: How to eliminate duplicates from select query? - Stack Overflow
Browsing latest articles
Browse All 5 View Live

Answer by jash for How to eliminate duplicates from select query?

An easy one would be:SELECT DISTINCT (userID) userdID, name, yr FROM TABLE_NAME

View Article



Answer by criticus for How to eliminate duplicates from select query?

If you don't need to keep different yrs, just use DISTINCT ON (FIELD_NAME)SELECT DISTINCT ON (userID) userdID, name, yr FROM TABLE_NAME

View Article

Answer by kushalbhaktajoshi for How to eliminate duplicates from select query?

Try this one:SELECT * FROM TABLE_NAME GROUP BY userID

View Article

Answer by RichardTheKiwi for How to eliminate duplicates from select query?

For PostgreSQL as well as SQL Server 2005+, DB2 and later versions of Oracle (9+), you can use the windowing function ROW_NUMBER()select *from(select *, ROW_NUMBER() over (partition by userID order by...

View Article

How to eliminate duplicates from select query?

Before asking this question I searched using Google but I couldn't understand or maybe could not find a solution suitable for my situation.So, I have one Table with 10 columns, I want to eliminate...

View Article

Browsing latest articles
Browse All 5 View Live




Latest Images