我在执行下面的plsql查询时遇到错误ORA-01422
Declare
X NUMBER ;
Bonus number;
begin
select acy_opening_bal into x from sttm_cust_account where branch_code ='000';
bonus:= x+2000;
dbms_output.put_line('bonus is: '|| bonus);
end;
/
答案 0 :(得分:0)
Declare
X NUMBER ;
Bonus number;
begin
select distinct first_value(acy_opening_bal) over (partition by branch_code ORDER BY acy_opening_bal ASC) into x from sttm_cust_account where branch_code ='000';
bonus:= x+2000;
dbms_output.put_line('bonus is: '|| bonus);
end;
/