我想在 case 语句中返回多行。是否可以?还是有其他方法可以做到这一点?
select
case
when 3 = 1
then (select orderid from order_master where noOfInstallment = installmentPaid)
else
(select orderid from order_master where noOfInstallment <> installmentPaid)
END
两个子查询都返回多行。现在上面的查询显示以下错误。
子查询返回超过 1 个值。当子查询跟随 =、!=、<、<=、>、>= 或子查询用作表达式时,这是不允许的。