17.10 - SQL_data_access - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)

Specifies whether the procedure body accesses the database or contains SQL statements.

This clause is mandatory for all SQL procedures. See CREATE PROCEDURE (SQL Form) in Teradata Vantage™ - SQL Data Definition Language Detailed Topics, B035-1184 for descriptions of the SQL data access options.

CONTAINS SQL
The procedure can execute SQL control statements.
The procedure neither reads nor modifies SQL data in the database. An example is a procedure whose body consists of just control statements local to the procedure.
MODIFIES SQL DATA
The procedure can execute all SQL statements that can validly be called from an SQL procedure.
This is the default option for SQL procedures that do not specify an SQL Data Access clause when the procedure is defined.
An example of such as statement is an UPDATE, INSERT or DELETE.This is the default
READS SQL DATA
The procedure cannot execute SQL statements that modify SQL data, but can execute statements that read SQL data.
An example is the FETCH statement.