16.20 - CALL - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Manipulation Language

Teradata Database
Teradata Vantage NewSQL Engine
March 2019
Programming Reference


Invokes an SQL procedure or external stored procedure.

Required Privileges

You must have the EXECUTE PROCEDURE privilege on the procedure or the containing database or user.

You do not require any privileges on the database objects referenced by a called procedure. The privileges are checked for the immediate owner of the called procedure.

The immediate owner must have the privileges on the referenced objects WITH GRANT OPTION to allow other users to access the object.

For more information, see Teradata Vantage™ SQL Data Definition Language Detailed Topics , B035-1184 and Teradata Vantage™ - Database Administration, B035-1093.

Privileges Granted Automatically

If you call the SQLJ.Install_Jar procedure to install a JAR file containing classes that implement a Java external stored procedure, the DROP PROCEDURE privilege is automatically granted to the creator of the JAR file, that is, the caller of SQLJ.Install_Jar.


Syntax Elements

Optional qualifier for the SQL procedure or external procedure to be executed.
If database_name is not specified, the current default database is assumed.
Name of the SQL procedure or external procedure to be executed.
Supported arithmetic and string expressions.
The following can be specified in a value expression, subject to client-specific restrictions:
  • SQL procedure local variables
  • SQL procedure status variables
  • IN or INOUT parameters
  • FOR loop columns and aliases
  • Host variables and macro parameters
  • FORMAT, TITLE, and NAMED phrases
  • Scalar UDFs
  • Scalar subqueries
For client-specific rules, see Rules For Calling Procedures From Embedded SQL.
A call parameter argument.
A QUESTION MARK character as an input call argument is valid only in SQL DML, ODBC, and JDBC client applications.
An identifier prefixed with the COLON (:) character.
Depending on the calling utility, the out_call_variable can be one of these:
  • host variable
  • local variable
  • IN or INOUT parameter
A parameter name.
The placeholder provides for nesting of placeholders (parameters or CAST … AS clauses).
The name of the OUT parameter as defined in the SQL procedure.
The request to convert the data definition of a parameter or another CAST clause to the required type. CAST clauses can be nested.
FORMAT, NAMED and TITLE clauses can be used with the CAST operator.
The data definition for the parameter set.
See Teradata Vantage™ Data Types and Literals, B035-1143.

ANSI Compliance

CALL is ANSI SQL:2011-compliant.