16.20 - CALL - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Manipulation Language

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
created_date
March 2019
category
Programming Reference
featnum
B035-1146-162K

Purpose

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



Syntax Elements

database_name
user_name
Optional qualifier for the SQL procedure or external procedure to be executed.
If database_name is not specified, the current default database is assumed.
procedure_name
Name of the SQL procedure or external procedure to be executed.
value_expression
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.
out_call_variable
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
out_call_placeholder
A parameter name.
The placeholder provides for nesting of placeholders (parameters or CAST … AS clauses).
parameter_name
The name of the OUT parameter as defined in the SQL procedure.
CAST … AS
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.
data_type
The data definition for the parameter set.
See Teradata Vantage™ Data Types and Literals, B035-1143.

ANSI Compliance

CALL is ANSI SQL:2011-compliant.