what is difference between procedure and function

Answer Posted / nannesaheb chinthalacheruvu

Procedure :
->Procedure is a Named PL/SQL Block which can be stored in
Database in compile form.
->Procedure is used to execute the Perticular task.
->Procedure Does not required RETURN clause.
->Procedure Does not Return value
->It is not posible to execute using SQL statements.
->Procedures can be execute using a)Execute/Call,b)Anonymous
Block

Function :
->Function is a Named PL/SQL Block Which can be Stored in
Database in Compile Form.
->Function is used for Calculation Perpose.
->Fuction Does Contains RETURN Type
->Fuction Can Return only One Value.
->Fuction can Execute using SQL Statements when We can not
Perform any DML Operations in Function.
->Using Out Mode Parameters we can Return Multiple Records
in Function.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

1733


What are different types of tables in sql?

539


How does cross join work?

509


What is using in sql?

581


Why coalesce is used in sql?

479






What is the advantage of nosql?

540


What does count (*) mean in sql?

1108


What are the two types of exceptions.

647


1. is it possible to use the cursor atttibutes (%found ,% rowcount , %isopen , %notfound ) to our user defined cursor names ....... cursor cursor_name is select * from scott.emp if you use... cursor_name%found , %rowcount ,%isopen,%notfound...will it work... -------------------------- 2.what is the difference between the varray and index by table .. -------- 3. type type_name is table of number(8,3) index by binary_integer; identifier_name type_name; first , last , prior , next ,trim are the methods we can use it for the above type...simillary is there any way to apply for cursors... with thanks and regards..sarao...

1928


What are % type and % rowtype?

584


How to install oracle sql developer?

586


Does pl/sql support create command?

586


1) Synonyms 2) Co-related Subquery 3) Different Jobs in Plsql 4) Explain Plan 5) Wrap 6) Query Optimization Technique 7) Bulk Collect 8) Types of index 9) IF primary key is created then the index created ? 10) Foreign Key 11) Exception Handling 12) Difference Between Delete and Trunc 13) Procedure Overloading 14) Grant Revoke 15) Procedure Argument types. 16) Functions. 17) Joins

1166


how many ways we can we find the current date using mysql? : Sql dba

626


What are basic techniques of indexing?

853