CREATE OR REPLACE PROCEDURE transfer(
crdtacno IN NUMBER,
dbtacno IN NUMBER,
amount NUMBER,
transno NUMBER ) IS
BEGIN
INSERT INTO transaction VALUES(transno,amount,SYSDATE);
UPDATE account SET accbal=accbal+amount
WHERE accno=crdtacno;
INSERT INTO entrylist VALUES(transno,crdtacno,'CR');
UPDATE account SET accbal=accbal-amount
WHERE accno=dbtacno;
INSERT INTO entrylist VALUES(transno,dbtacno,'DB');
END;
/

Is this the only code that you are compiling as part of the procedure ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.