Use the @DDL function to return information about a DDL operation.
Syntax
@DDL ({TEXT | OPTYPE | OBJNAME | OBJTYPE | OBJOWNER})
OBJNAMEReturns the name of the object that is affected by the DDL.
OBJOWNERReturns the name of the owner of the object that is affected by the DDL.
OBJTYPEReturns the type of object that is affected by the DDL, such as TABLE or INDEX)
OPTYPEReturns the operation type of the DDL, such as CREATE or ALTER.
TEXTReturns the first 200 characters of the text of the DDL statement.
Example
The following example uses the output from @DDL in an EVENTACTIONS shell command.
DDL INCLUDE OBJNAME src.t* &
EVENTACTIONS (SHELL ('echo The DDL text is var1> out.txt ', &
VAR var1 = @DDL (TEXT)));
The redirected output file might contain a string like this:
The DDL text is CREATE TABLE src.test_tab (col1 int);