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

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
qtb1554762060450.ditamap
dita:ditavalPath
lze1555437562152.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);