Comparison With Functions
- A function is a subprogram written to perform certain computations
- A scalar function returns only a single value (or NULL), whereas a table function returns a (relational) table comprising zero or more rows, each row with one or more columns.
- Functions must return a value (using the
RETURNkeyword), but for stored procedures this is not compulsory. - Stored procedures can use
RETURNkeyword but without any value being passed. - Functions could be used in
SELECTstatements, provided they don’t do any data manipulation. However, procedures cannot be included inSELECTstatements. - A stored procedure can return multiple values using the
OUTparameter or return no value at all..
Read more about this topic: Stored Procedure
Famous quotes containing the words comparison with, comparison and/or functions:
“Certainly there is not the fight recorded in Concord history, at least, if in the history of America, that will bear a moments comparison with this, whether for the numbers engaged in it, or for the patriotism and heroism displayed.”
—Henry David Thoreau (18171862)
“He was a superior man. He did not value his bodily life in comparison with ideal things. He did not recognize unjust human laws, but resisted them as he was bid. For once we are lifted out of the trivialness and dust of politics into the region of truth and manhood.”
—Henry David Thoreau (18171862)
“Adolescents, for all their self-involvement, are emerging from the self-centeredness of childhood. Their perception of other people has more depth. They are better equipped at appreciating others reasons for action, or the basis of others emotions. But this maturity functions in a piecemeal fashion. They show more understanding of their friends, but not of their teachers.”
—Terri Apter (20th century)