UDF Part II


All UDFs are defined using the CREATE FUNCTION statement, which varies slightly for scalar, in-line, and multi-statement functions. Scalar UDFs have the following syntax:

CREATE FUNCTION owner.function_name
(parameter_name data_type [=default] [, n])
RETURNS scalar_data_type
[WITH function_option]
AS BEGIN
Function_body
RETURN scalar_expression
END

Article by Baya Pavliashvili, more


Recommended Book:

Comments

Popular posts from this blog

SQL 2008

SQL Buddy

UDFs in SQL Server