How to execute a PL/SQL function from the SQL prompt
449285Sep 16 2005 — edited Sep 16 2005Hi All,
I have created a PL/SQL fuction in the database as shown below:
Create or replace function balance_check(surname IN varchar2)
return number is
totalsales number(12,2);
BEGIN
select total_sales into totalsales from customer where surname = surname;
return totalsales;
END;
/
Now, I want someone to show me how to execute this function from the SQL prompt. I have tried doing this but hard errors anytime I tried.
Thanks in advance.