15.10 - SQL_data_access - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

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