Я попробовал следующий код:
CREATE OR REPLACE PROCEDURE test(x IN account.Accno%TYPE,y IN
account.Balance%TYPE)
IS
cur_balance account.Balance%TYPE(20);
BEGIN
select Balance
into cur_balance
from Account
where Accno = x;
if cur_balance < y then
dbms_output.put_line('The amount entered is more than the amount balance');
else
update Account
set Balance =cur_balance-y
where Accno = x;
end if;
dbms_output.put_line('Money has been withdrawn successfully');
commit;
END;
/