User Defined Functions:
We can create our own functions using CREATE FUNCTION statements. The syntax for creating a function is
Syntax:
CREATE FUNCTION
[owner_name.] function_name
( [ { @parameter_name [AS] scalar_parameter_data_type [ = default ] } [ ,...n ] ] )
RETURNS
scalar_return_data_type
[WITH < function_option> [[,] ...n] ]
[AS]
BEGIN
function_body
RETURN scalar_expression
END
We can create our own functions using CREATE FUNCTION statements. The syntax for creating a function is
Syntax:
CREATE FUNCTION
[owner_name.] function_name
( [ { @parameter_name [AS] scalar_parameter_data_type [ = default ] } [ ,...n ] ] )
RETURNS
scalar_return_data_type
[WITH < function_option> [[,] ...n] ]
[AS]
BEGIN
function_body
RETURN scalar_expression
END
0 comments:
Post a Comment