我的查詢:更新命令: - 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