Argument: (1) |--+--------------+--+-| Subset of Expression |------+----------| '-parameter--=-' +-NULL--------------------------+ '-(--singleton_select--)--------'
Element | Description | Restrictions | Syntax |
---|---|---|---|
parameter | A parameter whose value you specify | Must match a name that CREATE FUNCTION or CREATE PROCEDURE statement declared | Identifier |
singleton
_select |
Embedded query that returns a single value | Must return exactly one value of a data type and length compatible with parameter | SELECT |
The CREATE PROCEDURE or CREATE FUNCTION statement can define a parameter list for a UDR. If the parameter list is not empty, you must enter arguments when you invoke the UDR. An argument is a specific value whose data type is compatible with that of the corresponding UDR parameter.
When you execute a UDR, you can enter arguments in either of two ways:
You cannot mix these two ways of specifying arguments within a single invocation of a routine. If you specify a parameter name for one argument, for example, you must use parameter names for all the arguments.
In the following example, both statements are valid for a user-defined procedure that expects three character arguments, t, d, and n:
EXECUTE PROCEDURE add_col (t ='customer', d ='integer', n ='newint'); EXECUTE PROCEDURE add_col ('customer','newint','integer') ;Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]