這裏是我的例子:處理MySQL的子查詢返回多行
select row_x from table_1 where row_y = (select row_a from table_2 where row_b = x)
是我遇到的問題是,我的查詢需要,如果子查詢返回多行返回多行。
理想的情況下,將轉化爲類似於:
'select row_x from table_1 where row_y = '<first row from subquery>' or row_y = '<second row from subquery>' etc.
我怎樣才能做到這一點?謝謝!
如果你什麼'row_y IN(子查詢)'? – Compeek 2011-04-27 17:56:34