Example: Using RETURNS and RETURNS STYLE Clauses in the Same Procedure Call - Teradata Database - Teradata Vantage NewSQL Engine

SQL Data Manipulation Language

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
fbo1512081269404.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™

This example specifies both RETURNS and RETURNS STYLE clauses in a CALL request using the following partial procedure definition.

     CREATE PROCEDURE XSP_1(
       IN A INT,
       OUT B TD_ANYTYPE,
       OUT C INT,
       OUT D TD_ANYTYPE, 
       OUT E INT,
       OUT F TD_ANYTYPE)
       …;

You can call xsp_1 using the following parameter specifications, mixing both RETURNS and RETURNS STYLE OUT parameter return types.

CALL myXSP1(10, RESULT_B RETURNS INTEGER, RESULT_C,
            RESULT_D RETURNS STYLE t1.int_col, 
            RESULT_E, RESULT_F RETURNS INTEGER);