SQL_data_access - Analytics Database - Teradata Vantage

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™

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.