Return statement

A RETURN statement gracefully exits the procedure and optionally returns a value.

RETURN [expression];
Syntax rules
  • If an expression is specified, the procedure must have a return parameter and the value must be implicitly convertible to the expected type.

  • Even if the procedure has a return parameter, it is not required to specify a return value in a RETURN statement. A return parameter can be set through an assignment or it can be left as null.

Sample usage
CREATE VIRTUAL FUNCTION times_two(val integer)
   RETURNS integer AS
      RETURN val*2;

results matching ""

    No results matching ""