Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is difference between procedure and function

Answers were Sorted based on User's Feedback



what is difference between procedure and function..

Answer / p.rajasekar

Function:
1.Function Always Return values
2.We can call the function in select Query
3.We can return more than one values using Out put
paramaetes
4.Genrally we can use function as calculatevalues
5.We can insert,update or delte value with the help
function in a select query
Procedure:
1.Procedure doesnot always return value
2.We can't call procedure in Select query
3.We can return more than one value using Out put
parameters in procedure
4.Genarally procudures are using as business logic

Is This Answer Correct ?    6 Yes 0 No

what is difference between procedure and function..

Answer / a.jyothsna

1) function can be executed using the sql command
(Ex: select functin_name(args)from dual;)
Procedure can be executed using sql+ command
(Ex: exec procedure_name(args))

Is This Answer Correct ?    3 Yes 0 No

what is difference between procedure and function..

Answer / suresh

Function is return the value
procedure is not return the value

Is This Answer Correct ?    5 Yes 3 No

what is difference between procedure and function..

Answer / monalisa dalbehera

Function always return a single value
Procedure may or may not return a value.
A procedure can return more than one value by using out
parameter.

Is This Answer Correct ?    2 Yes 0 No

what is difference between procedure and function..

Answer / 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

what is difference between procedure and function..

Answer / shanmukha srinivas

procedure can run in sql block like
begin
sp_procedure_name(input parameters);
end;
function can run in sql block like
select sf_function_name(input paramters)

Is This Answer Correct ?    0 Yes 0 No

what is difference between procedure and function..

Answer / aditi yadav

in addition to above answers -
1. Functions can be called inside procedure but procedure cannot be called inside functons.
2. Functions compiled every time when we call them whereas procedure compiles only once & can be called again and again without being compiled.
3. we can user functions in select statement but cannot use procedure.
4. Inside function we cannot user DML commands but inside procedures we can use DML commands.

Is This Answer Correct ?    0 Yes 0 No

what is difference between procedure and function..

Answer / subhendu

Functions called from SQL have special restrictions:

Accept only IN parameters
cannot contain DML
cannot contain DDL - implies COMMIT
Accept and return only SQL datatypes (not PL/SQL
specific datatypes)
Must use positional notation
Must own or have EXECUTE privilege
Cannot contain transactional or session control
statements (eg. COMMIT, ROLLBACK, ALTER)

Is This Answer Correct ?    0 Yes 2 No

what is difference between procedure and function..

Answer / shyam katwal

The only difference between procedure and function is:
Function returns a value
whereas
Procedure does not return a value

Is This Answer Correct ?    0 Yes 2 No

what is difference between procedure and function..

Answer / k.sharada

procedure returns a value and function do not.

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More SQL PLSQL Interview Questions

Which are the most commonly used sql joins?

1 Answers  


what are the different functions in sorting an array? : Sql dba

0 Answers  


how to insert the data through views? The view is depending upon more than two tables? how to update materalized views?

3 Answers   3i Infotech,


i have a table t1 a math 20 b phy 30 cchemisty 10 a math 40 b phy 23 c che 21 a math15 bphy 33 c che 56 write a quire to find out the max markr of each subject

8 Answers  


i have a table emp and columns ename,empno,mgr_id,i need ename,manager name as result i.e employee respective manager.. example empno ename mgr_id 1 john 3 2 paul 3 3 smith 1 4 kevin 1 5 stewart 2 result has to look like this ename manager john smith paul smith smith john kevin john stewart paul can u plz help me out in this.....

8 Answers  


What is pl sql record in oracle?

0 Answers  


Can we connect to postgresql using sql developer?

0 Answers  


What are the topics in pl sql?

0 Answers  


How to trace the errors in pl/sql block code?

5 Answers   TCS,


What are the commands used in sql?

0 Answers  


What is varchar example?

0 Answers  


HOW TO TUNE ORACLE SQL QUERIES GIVE ME STEP BY SREP

1 Answers   TCS,


Categories