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:
“I have travelled a good deal in Concord; and everywhere, in shops, and offices, and fields, the inhabitants have appeared to me to be doing penance in a thousand remarkable ways.... The twelve labors of Hercules were trifling in comparison with those which my neighbors have undertaken; for they were only twelve, and had an end; but I could never see that these men slew or captured any monster or finished any labor.”
—Henry David Thoreau (18171862)
“It is very important not to become hard. The artist must always have one skin too few in comparison to other people, so you feel the slightest wind.”
—Shusha Guppy (b. 1938)
“Empirical science is apt to cloud the sight, and, by the very knowledge of functions and processes, to bereave the student of the manly contemplation of the whole.”
—Ralph Waldo Emerson (18031882)