Skip to content
Advertisement

How can i have where clause in Nested queries with select statement that returns more than 1 records

I am currently trying to make an nested query of some sort where it returns a set of rows which fulfills a particular set of requirements..

Though this returns error:

ERROR: more than one row returned by a subquery used as an expression

Which is true, but how i should make this call then? The inner select might return x number of id’s which are valid?

Advertisement

Answer

Is there a reason why you are using subselects to accomplish this?

The regular way to do this is with joins:

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