CREATE FUNCTION

Create a user-defined function.

Syntax
      CREATE FUNCTION [schema.] function
         ( [@parameter [ AS ][type_schema.] parameter_data_type  [= default ]
            [ ,...n ]
           ])
      RETURNS
          return_clause...
      [;]


Key:
    function            Name of the function(s) to add.
    schema              The schema to which the user-defined function belongs.
    parameter_data_type The data type of the function (not timestamp) 
                        CLR functions, accept a limited range of data types.

The details of the return clause will vary for Scalar, Inline/Multistatement Table-valued, or CLR functions.
See SQL Server books online or the resources on the SQL Links page

"Form follows function" - Louis H. Sullivan

Related commands:

ALTER FUNCTION
DROP FUNCTION
Equivalent Oracle commands: CREATE FUNCTION


© Copyright SS64.com 1999-2014
Some rights reserved