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

testing tools?

1975


what is global tempory table?

6768


Explain what are the tables of auto invoice?

891


pls send me out bound code of supplers,site,bankiformation code pls as soon as

2035


what are the different transaction clauses in AR?

1846


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

1858


What is oracle soa suite?

983


Tell me where we find the status of order information?

941


please send me forms, xml pulisher questions,answers

1894


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

1839


is it possible to run the interface without using oracle apps?

1728


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

946


q)what are the validations in sql*loader

2049


What do you understand by a set of books?

850


How can you achieve loose coupling in soa framework?

1000