我的查询:更新命令: - ORA-01427: “单行子查询返回多个行”
update bl1_customer bl
set bl.CYCLE_CODE=(select c.BILL_CYCLE
from canba_bs3 c
inner join bl1_customer bl
on c.CUSTOMER_ID=bl.CUSTOMER_ID)
where exists (select c.BILL_CYCLE
from canba_bs3 c
inner join bl1_customer bl
on c.CUSTOMER_ID=bl.CUSTOMER_ID) and
bl.status='O';
update bl1_customer bl
set bl.CYCLE_CODE=(select c.BILL_CYCLE
from canba_bs3 c
inner join bl1_customer bl
on c.CUSTOMER_ID=bl.CUSTOMER_ID)
where exists (select c.BILL_CYCLE
from canba_bs3 c
inner join bl1_customer bl
on c.CUSTOMER_ID=bl.CUSTOMER_ID) and
bl.status='O';
错误:
ERROR at line 1:
ORA-01427: single-row subquery returns more than one row
请帮我解决这个问题
两个更新是相同的?或者我错过了一个区别? – 1010