select
disease_name
from
disease
where
disease_id=
(select disease_id from disease_symptom where
disease.disease_id=disease_symptom.disease_id AND
symptom_id=
(select symptom_id from symptom where symptom.symptom_id=disease_symptom.symptom_id
AND symptom_name='fever' OR symptom_name='head ache'))
给出子查询返回多个行的错误。原因是什么?子查询返回多于一行
我想我会是一个明显的例子:子查询返回多行。 'disease_id'不能等于多个值。这个查询最好用'JOIN'来代替子查询。 – 2013-02-12 21:17:30
http://stackoverflow.com/a/3423792/2806972 c这可能会得到这个Q的解决方案: – 2014-04-05 08:03:04