Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to execute a PL/SQL function from the SQL prompt

449285Sep 16 2005 — edited Sep 16 2005
Hi 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 14 2005
Added on Sep 16 2005
21 comments
1,554 views