Jump to content

User-defined function

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 67.20.251.30 (talk) at 05:12, 9 April 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

User Defined Function, or UDF is an extension to a SQL Server (like MySQL) that can be compiled for use in a SQL query. For example, if it is necessary to obtain a random number for use as a primary key, and MySQL does not support that function, a new, external function could be written and compiled to accomplish this task. One sample of such query could be:

SELECT GETRANDOMKEY();

Essentially, this external function becomes part of the server itself.