When we talk about the difference between SP and Function, it is said that Function returns a value where as SP doesn't. My Question is, Then what does the "OUTPUT" parameter Stands for in SP?
Kindly make my doubts clear on this.
As a matter of fact both SP and Function can return or not return (return Null, void in other languages) values. But the basic difference is - a Function can be uses in an expression or as a part of expression where SP cannot be.
well, i would say something to add to above.
SPs always return a resultset where as in a function we have to define the return type in advance.
The OUTPUT parameters in SPs are nothing but the parameters passed by reference. The function will never accept any parameter defined as output parameter.