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
RETURN
keyword), but for stored procedures this is not compulsory. - Stored procedures can use
RETURN
keyword but without any value being passed. - Functions could be used in
SELECT
statements, provided they don’t do any data manipulation. However, procedures cannot be included inSELECT
statements. - A stored procedure can return multiple values using the
OUT
parameter or return no value at all..
Read more about this topic: Stored Procedure
Famous quotes containing the words comparison with, comparison and/or functions:
“From top to bottom of the ladder, greed is aroused without knowing where to find ultimate foothold. Nothing can calm it, since its goal is far beyond all it can attain. Reality seems valueless by comparison with the dreams of fevered imaginations; reality is therefore abandoned.”
—Emile Durkheim (18581917)
“When we reflect on our past sentiments and affections, our thought is a faithful mirror, and copies its objects truly; but the colours which it employs are faint and dull, in comparison of those in which our original perceptions were clothed.”
—David Hume (17111776)
“In todays world parents find themselves at the mercy of a society which imposes pressures and priorities that allow neither time nor place for meaningful activities and relations between children and adults, which downgrade the role of parents and the functions of parenthood, and which prevent the parent from doing things he wants to do as a guide, friend, and companion to his children.”
—Urie Bronfenbrenner (b. 1917)