Saturday, February 20, 2010

Diffrence between FUNCTIONS AND STORED PROCEDURES

1. Functions are compiled and executed at run time.
Stored procedures are stored in parsed and compiled format in the database.


A Function returns 1 value only. Procedure can return
multiple values (max 1024).


Procedure can return zero or n values whereas function can return one value which is mandatory.

sp takes input,output parameters, function takes only
input parameters.


Functions are basically used to compute values. We passes some parameters to functions as input and then it performs some

operations on the parameter and return output.
Stored procedures are basically used to process the task.


Functions can be called from procedure whereas procedures cannot be called from function.


Function do not return the images, text. Stored Procedure returns all

No comments:

Post a Comment