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

List of all the modules under Manufacturing, Finance and Distribution in oracle applications?

1805


Do you know what are user profiles in apps. Any examples you can give?

666


how can develope the po variance and po summary report? with tables mandatory columns and query please?

1979


How can we import the data into a database using sql * loader?

683


What is a value set? List its various types.

652






What is a flexfield? List out its types.

669


What is oracle soa suite and what are its different components?

648


What are the Standard Reports and Forms in HRMS?

1774


List the types of flexfield?

605


Hi any one plz help me .i need 2 or 3 customized and 2 or 3 development reports on PO module..if any body having plz send me with one by one step ,i mean where u do the customization and wht are the steps u follwed when u do the customization,wht are fields u added or deleted ,How u added or these fields as per clinet requirement and wht are errors u faced .plz send it to my mail id iamvenki@gmail.com

1892


tell my any difficult situtation you solved in your experience in your company?

1869


What is oracle soa suite?

768


Explain what are the tables of auto invoice?

650


how to print multi lay outs,muti currency,muti language in xml publisher

10752


can we use look up type instead of a pofile option?or valueset?is it possible how?

1788