57 lines
3.6 KiB
HTML
57 lines
3.6 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="reference" />
|
||
|
<meta name="DC.Title" content="Write UDFs as SQL functions" />
|
||
|
<meta name="abstract" content="SQL functions are UDFs that you have defined, written, and registered using the CREATE FUNCTION SQL statement." />
|
||
|
<meta name="description" content="SQL functions are UDFs that you have defined, written, and registered using the CREATE FUNCTION SQL statement." />
|
||
|
<meta name="DC.subject" content="UDFs (User-defined functions), writing your own UDF, SQL" />
|
||
|
<meta name="keywords" content="UDFs (User-defined functions), writing your own UDF, SQL" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyudf.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyscalarudf.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyudftableex.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rbafyudfsql" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Write UDFs as SQL functions</title>
|
||
|
</head>
|
||
|
<body id="rbafyudfsql"><a name="rbafyudfsql"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Write UDFs as SQL functions</h1>
|
||
|
<div><p>SQL functions are UDFs that you have defined, written, and registered
|
||
|
using the CREATE FUNCTION SQL statement.</p>
|
||
|
<div class="section"><p>As such, they are written using only the SQL language and their
|
||
|
definition is completely contained within one (potentially large) CREATE FUNCTION
|
||
|
statement. The creation of an SQL function causes the registration of the
|
||
|
UDF, generates the executable code for the function, and defines to the database
|
||
|
the details of how parameters are passed.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="rbafyscalarudf.htm">Example: SQL scalar UDFs</a></strong><br />
|
||
|
In this example, a function returns a priority based on a date.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyudftableex.htm">Example: SQL table UDFs</a></strong><br />
|
||
|
This example illustrates a table function that returns data based on a date.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafyudf.htm" title="In writing SQL applications, you can implement some actions or operations as a UDF or as a subroutine in your application: Although it may appear easier to implement new operations as subroutines in your application, you might want to consider the advantages of using a UDF instead.">Use user-defined functions (UDFs)</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|