我正在尝试创建一个根据事务类型更新事务表的过程......但我无法更正错误:PL/SQL: Statement ignored
我的代码是:
create or replace procedure proc(acn transaction.acctno%TYPE, tt transaction.transtype%TYPE, amt transaction.amount%TYPE, bal transaction.balance%TYPE, dt transaction.dot%TYPE)
IS
ano transaction.acctno%TYPE;
ba transaction.balance%TYPE;
BEGIN
select acctno,balance into ano,bno from transaction where accctno=acn;
if tt='W' and bno>500
then
update transaction set balance=balance-amt;
elsif tt='D'
then
update transaction set balance=balance+amt;
else
dbms_output.put_line('Insufficient balance');
end if;
END;
完整错误:
ERROR at line 7: PL/SQL: Statement ignored
5. BEGIN
6. select acctno,balance into ano,bno from transaction where accctno=acn;
7. if tt='W' and bno>500
8. then
9. update transaction set balance=balance-amt;