DECLARE
Return_value VARCHAR2
(2000
);
BEGIN
/*Now call the stored program*/
Return_value := moja_funkcia_na_databaze
(1234, NULL
);
/*Output the results*/
dbms_output.put_line(SubStr
('Return_value = '||Return_value, 1, 255
));
COMMIT;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(SubStr
('Error '||TO_CHAR
(SQLCODE
)||
': '||SQLERRM, 1, 255
));
RAISE;
END;