Supported & Unsupported DML Statements in SQL Procedures | VantageCloud Lake - DML Statements in SQL Procedures - 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

See a list of supported and unsupported DML statements for SQL procedures when using CREATE PROCEDURE.

Supported DML Statements

You can specify the following SQL DML statements in an SQL procedure.

  • ABORT
  • BEGIN TRANSACTION
  • CALL
  • COLLECT STATISTICS (QCD Form)
  • COMMENT
  • COMMIT [WORK]
  • DECLARE CURSOR (selection form)
  • DELETE (all forms)
  • DROP STATISTICS (QCD Form)
  • END TRANSACTION
  • INSERT
  • MERGE
  • ROLLBACK
  • SELECT (only in cursors)

    You cannot specify row-returning SELECT requests in dynamic SQL that is written using the DBC.SysExecSQL procedure.

  • SELECT AND CONSUME TOP 1

    (only in non-updatable cursors)

  • SELECT INTO

    You cannot specify row-returning SELECT INTO requests in dynamic SQL that is written using the DBC.SysExecSQL procedure.

  • SELECT AND CONSUME TOP 1 INTO
  • UPDATE (all forms)

Unsupported DML Statements

You cannot specify the following SQL DML statements in an SQL procedure.

  • CHECKPOINT
  • COLLECT DEMOGRAPHICS
  • DUMP EXPLAIN
  • ECHO
  • INITIATE INDEX ANALYSIS
  • INITIATE PARTITION ANALYSIS
  • INSERT EXPLAIN
  • RESTART INDEX ANALYSIS
  • SELECT (outside of a cursor)
  • SELECT AND CONSUME
  • SELECT AND CONSUME (in updatable cursors)