Teradata Database has the capability for a stored procedure to return one or more result sets in addition to the output parameters being returned.
A stored procedure returns a result set to the client by creating a database cursor and not closing it before returning. A cursor opened by a stored procedure is positioned where the stored procedure left it off. A result set returned from a stored procedure is presented by ODBC as an ODBC cursor just like any other result set.
The OutputAsResultSet ODBC data source configuration option determines how stored procedure output parameters are to be delivered to the application. If set to Yes, the values of INOUT and OUT parameters are returned as a single-row result set. If set to No (default), these parameters are returned as bound ODBC parameters. If OutputAsResultSet is set to Yes and the application also expects dynamic result sets from SPs, then the single-row result set with parameter values is the first result set returned and the application should use SQLMoreResults to position to the subsequent result sets. This is standard ODBC practice when dealing with multiple result sets.