【发布时间】:2018-05-03 07:37:18
【问题描述】:
我有这个问题:
select a.*, b.*, (select c.* from tableC c where c.id_tableA = a.id) from tableA a inner join tableB b on a.id = b.id_tableA where b.id_user = 50;
子查询(即 tableC)按预期返回超过 1 行。如何从 tableC 中只返回 1 行以便它可以与查询的其余部分匹配?
到目前为止,我已经尝试过:
(select c.* from tableC c where c.id_tableA = a.id limit 1)
它没有像mysql所说的那样工作:
"操作数应包含 1 列"
【问题讨论】: