Unsupported DDL Statements in Procedures | CREATE PROCEDURE | Vantage - Unsupported DDL Statements in SQL Procedures - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

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
2023-07-11
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
Product Category
Teradata Vantage™

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

  • ALTER CONSTRAINT
  • ALTER METHOD
  • ALTER PROCEDURE
  • ALTER TYPE
  • BEGIN QUERY LOGGING
  • CREATE CONSTRAINT
  • CREATE GLOP SET
  • CREATE METHOD
  • CREATE PROCEDURE
  • CREATE TABLE (queue and trace table forms)
  • CREATE TYPE (all forms)
  • DATABASE
  • DROP CONSTRAINT
  • DROP GLOP SET
  • DROP TYPE
  • END QUERY LOGGING
  • FLUSH QUERY LOGGING
  • HELP (all forms)
  • REPLACE METHOD
  • REPLACE PROCEDURE
  • REPLACE QUERY LOGGING
  • REPLACE TYPE
  • SET QUERY_BAND … FOR SESSION
  • SET ROLE
  • SET SESSION (all forms)
  • SET TIME ZONE
  • SHOW (all forms)

You also cannot specify any DDL statements in an SQL procedure that administer any aspect of any row-level security constraints.

Note that these statements are restricted from being specified in CREATE PROCEDURE or REPLACE PROCEDURE DDL SQL text, not from being invoked as dynamic SQL from within a procedure definition. Dynamic SQL requests are parsed and bound at run time, not when the procedure that contains them is compiled, so it does not follow the same rules as must be observed when SQL requests are executed from within a compiled procedure. Any SQL statement that can be invoked as standalone dynamic SQL can also be invoked as dynamic SQL from within a procedure definition.