Content deleted Content added
ShellyHBean (talk | contribs) |
|||
Line 10:
==Databases==
In [[relational database management system]]s, a user-defined function provides a mechanism for extending the functionality of the [[database server]] by adding a function, that can be evaluated in standard query language (usually [[SQL]]) statements.
User-defined functions in SQL are declared using the <code>CREATE FUNCTION</code> statement. For example, a function that converts Celsius to Fahrenheit (a temperature scale used in USA) might be declared like this:
Line 19:
</syntaxhighlight>
Once created, a user-defined function may be used in [[expression (programming)|expressions]] in SQL statements. For example, it can be invoked where most other intrinsic functions are allowed.
<syntaxhighlight lang="sql">
|