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

Teradata Vantage™ - SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
vnq1596660420420.ditamap
dita:ditavalPath
hoy1596145193032.ditaval

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);