Parameters
Each parameter has a data type.
A collation can be specified for string-type parameters, using the COLLATE
clause.
- Input Parameters
-
Input parameters are presented as a parenthesized list following the name of the function.They are passed by value into the function, so any changes inside the function has no effect on the parameters in the caller.The
NOT NULL
constraint can also be specified for any input parameter, to preventNULL
being passed or assigned to it.Input parameters may have default values.Parameters with default values specified must be added at the end of the list of parameters. - Output Parameter
-
The
RETURNS
clause specifies the return type of the stored function.If a function returns a string value, then it is possible to specify the collation using theCOLLATE
clause.As a return type, you can specify a data type, a domain, the type of a domain (usingTYPE OF
), or the type of a column of a table or view (usingTYPE OF COLUMN
).