SQL Language Guide : 8. SQL Statements : RETURN ROW : RETURN ROW Example
 
Share this page                  
RETURN ROW Example
The following is a RETURN ROW example:
CREATE PROCEDURE rowproc ... AS
    ... RESULT ROW (CHAR(8), INT, FLOAT) ...
BEGIN
    ...
    FOR SELECT department, COUNT(*), AVG(salary) INTO :a, :b, :c FROM personnel
        GROUP BY deptname DO
    ...
   RETURN ROW (:a, :b, :c);
    ENDFOR;
     ...
  END;