CALL Syntax | SQL Statements | Teradata Vantage - CALL Syntax - Advanced SQL Engine - Teradata Database

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
vjt1596846980081.ditamap
dita:ditavalPath
vjt1596846980081.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantageā„¢
CALL [ database_name. | user_name. ] procedure_name
  ( { IN_argument | INOUT_argument | OUT_argument } [,...] ) [;]
IN_argument
INOUT_argument
{ value_expression | ? }
OUT_argument
{ out_call_variable | out_call_placeholder }
out_call_placeholder
{ parameter_name | CAST (OUT out_call_placeholder AS data_type) }

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
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.