Stored Procedure - Comparison With Functions

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 in SELECT 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:

    What is man in nature? A nothing in comparison with the infinite, an all in comparison with the nothing—a mean between nothing and everything.
    Blaise Pascal (1623–1662)

    [Girls] study under the paralyzing idea that their acquirements cannot be brought into practical use. They may subserve the purposes of promoting individual domestic pleasure and social enjoyment in conversation, but what are they in comparison with the grand stimulation of independence and self- reliance, of the capability of contributing to the comfort and happiness of those whom they love as their own souls?
    Sarah M. Grimke (1792–1873)

    Let us stop being afraid. Of our own thoughts, our own minds. Of madness, our own or others’. Stop being afraid of the mind itself, its astonishing functions and fandangos, its complications and simplifications, the wonderful operation of its machinery—more wonderful because it is not machinery at all or predictable.
    Kate Millett (b. 1934)