Example: Procedure with Parameter Style TD_General

Teradata Vantageā„¢ JSON Data Type

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1150-162K

This example shows an SQL definition for an external stored procedure using parameter style TD_GENERAL with an IN JSON parameter, and a C function that shows the corresponding parameter list.

/* Parameter Style TD_GENERAL */

CREATE PROCEDURE myJSONXSP2 ( IN a1 JSON(100),
                  OUT phonenum VARCHAR(100))  
NO SQL
PARAMETER STYLE TD_GENERAL
LANGUAGE C
EXTERNAL NAME 'CS!myJSONXSP2!myJSONXSP2.c!F!myJSONXSP2';
/* C source file name: myJSONXSP2.c */

void myJSONXSP2 (
     JSON_HANDLE    *json_handle, 
     VARCHAR_LATIN  *result, 
     char           sqlstate[6])
{
       /* body function */
}