All data is local to the procedure. No global data can be retained from procedure call to procedure call, with the exception of GLOP data. For details on GLOP data, see Global and Persistent Data.
A procedure cannot contain any static variables. A procedure can contain static constants.
You can specify the External Data Access clause in the CREATE PROCEDURE/REPLACE PROCEDURE statement to define the relationship between a function or external stored procedure and data that is external to Vantage.
- Whether or not the external routine can read or modify external data
- Whether or not the database will redrive the request involving the function or procedure after a database restart
- Teradata Vantage™ - Database Administration, B035-1093
- The RedriveProtection and RedriveDefaultParticipation DBS Control fields in Teradata Vantage™ - Database Utilities, B035-1102.
If you do not specify an External Data Access clause, the default is NO EXTERNAL DATA.
The following table explains the options for the External Data Access clause and how the database uses them for external routines.
Option | Description |
---|---|
MODIFIES EXTERNAL DATA | The routine modifies data that is external to the database. In this case, the word modify includes delete, insert, and update operations. Following a database failure, the database does not redrive requests involving a function or external stored procedure defined with this option.
|
NO EXTERNAL DATA | The routine does not access data that is external to the database. This is the default. |
READS EXTERNAL DATA | The routine reads, but does not modify data that is external to the database. |
For more information, see the information about CREATE PROCEDURE (External Form) in Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.