Return Clause: |--+-RETURNING------+-------------------------------------------> | (1) | '--------RETURNS-' (2) >--+-+-| Subset of SQL Data Types |------+--+----------------------+------------+--| | '-REFERENCES--+-BYTE-+--------------' | (1) | | | '-TEXT-' '--------AS--parameter-' | | .-,---------------------------------------------------------------. | | (3) V (2) | | '----------+-| Subset of SQL Data Types |------+--+----------------------+-+-' '-REFERENCES--+-BYTE-+--------------' | (1) | '-TEXT-' '--------AS--parameter-'
Element | Description | Restrictions | Syntax |
---|---|---|---|
parameter | Name that you declare here for a returned parameter of the UDR | Must be unique among returned parameters of UDRs. If any returned value of the UDR has a name, then all must have names. | Identifier |
In Dynamic Server, for backward compatibility, you can create SPL functions with the CREATE PROCEDURE statement. (That is, you can include a Return clause in CREATE PROCEDURE statements.) Use CREATE FUNCTION, however, to create new SPL routines that return one or more values.
After the Return clause has indicated what data types are to be returned, you can use the RETURN statement of SPL at any point in the statement block to return SPL variables that correspond to the values in the Return clause.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]