SQL Data Access and Security Privilege Options | VantageCloud Lake - SQL Data Access Options Supported by CREATE PROCEDURE and REPLACE PROCEDURE (SQL Form) - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
Option Description
CONTAINS SQL The procedure can run SQL control statements.

The procedure neither reads nor modifies SQL data in the database.

An example is a procedure whose body consists of only control statements local to the procedure.

If such a procedure attempts to read or modify SQL data, or calls a procedure that attempts to read or modify SQL data, the system raises the following SQLSTATE exception code.

'2F004' - reading SQL-data not permitted.
MODIFIES SQL DATA The procedure can run 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.

READS SQL DATA The procedure cannot run SQL statements that modify SQL data, but can run statements that read SQL data.

An example is the FETCH statement.

If such a procedure attempts to modify SQL data, or calls a procedure that modifies database data, the system raises the following SQLSTATE exception code.

'2F002' -modifying SQL-data not permitted.