CALL - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
16.10
Published
June 2017
Language
English (United States)
Last Update
2018-04-25
dita:mapPath
psg1480972718197.ditamap
dita:ditavalPath
changebar_rev_16_10_exclude_audience_ie.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

Purpose

Invokes an SQL procedure or external stored procedure.

Required Privileges

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

Users need not have 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 SQL Data Definition Language and Database Administration .

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 (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
Teradata Database-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. All Teradata Database-supported data types are valid.
For detailed information about data types, see SQL Data Types and Literals .

ANSI Compliance

CALL is ANSI SQL:2011-compliant.