What is function?

Answer Posted / kiran kumar

---- is a named pl/sql block to perform a specific task, is
mainly used for calculation purpose.
---- A function is called as part of an exception.
---- Every function should return a value
Example for function
Create or replace
Function get_sal(p_id in emp.emp_no% type)
Return number
Is
v_sal emp.sal%type :=0;
Begin
Select salary into v_salary

From emp

Where emp_no = p_id;
Return v_salary
End get_sal;
End;

Output :
var g_sal number;
Exec :g_sal := get_sal(99);
Print g_salary;

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sca and how is it useful?

880


What is instead of trigger in where we will use?

946


Explain oracle apps architecture.

1037


What does appl_top directory contain?

887


Do you know where we can check the status of po?

966


what are the prerequisites for costing transactions?

2913


If we have a repeated record in a table. But the repeated record how i can transfer from table to nested table?

1881


Hi  Friends this is preetham, i am  searching for job on oracle apps(technical) i put 3 years fake exp, so any one  please could you help me for realtime interview  questions and 9739782164 this is my no srpsrp777@gmail.Com please guys please provide your no for contact i have a doubts i want to clarify

1861


WHAT IS CUSTOM VIEW AND CUSTOM COMPONENT?

2849


Which oracle applications pl/sql standard apis you are familiar, have you used most of them?

898


CAN YOU CUSTOMISE THE COUTOMISE CUS_TOP

2385


What is a value set? List its various types.

881


What are the benefits of using soa architecture?

958


List the various types of value set.

847


List the types of flexfield?

829