Content deleted Content added
m pass at rewrite |
m formatting, remove merge request |
||
Line 1:
A '''User Defined Function''', or '''UDF''', is a [[function (programming)|function]] provided by the user of a program or environment, in a context where the usual assumption is that functions are built into the program or environment.
Line 12 ⟶ 10:
In SQL Databases, a user-defined function provides a mechanism for [[extension (computing)|extending]] to the [[database server]] by adding a function that can evaluated in SQL queries. User defined functions in SQL are declared using the <code>CREATE FUNCTION</code> keywords. For example, a function that converts Celcius to Fharenheit might be declared like this:
<
CREATE FUNCTION CtoF(@celcius FLOAT)
RETURNS FLOAT
Line 19 ⟶ 17:
return (@celcius * 1.8) + 32
END
</
Once created, the user-defined function may be invoked where most other intrinsic functions are available. This includes SELECT statements, where the function can be used against data stored in the database
Some database management systems allow the creation of user defined functions in languages other than SQL. Mirosoft SQL Server, for example, allows the user to use .NET languages for this purpose.
==External links==
|