Subquery returns more than one value

Database

Subquery returns more than one value

I need to join two tables that have no direct relation.
so another table has to be taken to join them

for ex:

Sel col_12, col_34

from table_a A
inner join table_b B

where B.col_sd= (sel C.col_sd
from table_a A
JOIN
table_c C
where A.col_sc= C.col_sc)

The subquery returns more than one column.
what to do?
help me on this plz....
2 REPLIES

Re: Subquery returns more than one value

Why are you using sub query? You can join them in same query like below

SEL
col_12, col_34
from table_a A
inner join table_c C
on A.col_sc = C.col_sc
inner join table_b B
on B.col_sd = C.col_sd
N/A

Re: Subquery returns more than one value

This is correct.