15.10 - EXTERNAL - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

The introduction to the mandatory external procedure body reference clause.

This clause is mandatory for all external procedures.

This clause can consist of:

  • The keyword EXTERNAL only.
  • The keywords EXTERNAL NAME plus an external procedure name (with optional Parameter Style specification)
  • The keywords EXTERNAL NAME plus a set of external string literals.
  • The keywords EXTERNAL NAME plus a set of Java external string literals.

Example: Creating an External Procedure With SQL CLIv2 Callability

The following C language external procedure definition creates a procedure named xsp_abc that can modify SQL data using the CLIv2 API:

     CREATE PROCEDURE xsp_abc(IN  param1  INTEGER, 
                              OUT result1 INTEGER)
     LANGUAGE C
     MODIFIES SQL DATA
     PARAMETER STYLE SQL
     EXTERNAL NAME 'SP!CLI!CS!xsp_abc!xsp_abc.c';