我将尝试运行以下查询:
select a.*,
case when NVL (SELECT max(b.field1)
FROM b
where b.field2 = a.tbl_a_PK , 'TRUE') = 'TRUE'
then 'has no data in b'
else 'has data in b' end as b_status
from a
我检查了nvl内部的select语句,发现它仅返回1个值(因此不应该有问题)。然而,我收到了“ORA-00936: missing expression”错误提示。