more than one row returned
Can anyone explain me why this query results in an error more than 1 row returned by a subquery used as an expression
select a.*, (select b.x from b where a.id = b.a_id) from a
especially since the problem is resolved once i change it to this
select a.*, case when (select true from b where a.id = b.a_id and b.x = true) = true then true else false end
1 Reply
never mind, should've used
exists