Get Object DDL
get_object_ddlRetrieve the SQL DDL that recreates a DB2 for i object such as a table, view, or procedure. Uses QSYS2.GENERATE_SQL and returns the statements without running them.
Instructions
Return the SQL DDL that recreates a database object, using QSYS2.GENERATE_SQL. Does not run the generated statements. Requires IBM i 7.3 or later.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Object type: TABLE, VIEW, INDEX, ALIAS, TRIGGER, FUNCTION, PROCEDURE, or SEQUENCE | |
| object | Yes | Object name | |
| schema | No | Schema (library) that contains the object. Uses the system's default schema if not provided. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ddl | No | ||
| type | No | ||
| error | No | ||
| object | No | ||
| schema | No | ||
| success | Yes |