15.00 - Unsupported DDL Statements in SQL Procedures - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

prodname
Teradata Database
vrm_release
15.00
category
Programming Reference
featnum
B035-1184-015K

Unsupported DDL Statements in SQL Procedures

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.