Skip to content
Advertisement

Oracle select same id where 2 exist

so this query of this Oracle table shows 2 rows with same id

all good —

but there are other ids that have more than 1 entry as well so this query:

works but brings back 2 different ids that both have more than 1 entry

I don’t care which id I get. I just want both of the ids to be the same.

Advertisement

Answer

You better use an analytical function like this to fetch the entire row for all the same ids having more than one record:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement