我使用此查询这是不允许的:子查询返回多个值当子查询
select *
from Master_Shares
where (PartnerId = (select distinct PartnerId from Master_Shares))
这引发错误:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
这是什么查询应该做的事情?这只是过滤行,对吧?到有PartnerId设置的那些?为什么你不会简单地使用WHERE子句来过滤它们(比如WHERE PartnerId不为空)? –