Neoview SQL Reference Manual (R2.3)
SHOWDDL Statement
• “Syntax Description of SHOWDDL” (page 175)
• “Considerations for SHOWDDL” (page 175)
• “Differences Between SHOWDDL Output and Original DDL” (page 175)
• “PRIVILEGES Option” (page 176)
• “Examples of SHOWDDL” (page 176)
The SHOWDDL describes details about objects in its display.
SHOWDDL {[PROCEDURE] procedure-name }| [TABLE] object-name} [, PRIVILEGES]
procedure-name is:
[schema-name.]procedure-name
object-name is:
[schema-name.]object-name
Syntax Description of SHOWDDL
procedure-name
specifies the name of a stored procedure. If procedure-name is not fully qualified,
SHOWDDL uses the default schema for the session.
object-name
specifies the ANSI name of a table, materialized view, or view. If object-name is not fully
qualified, SHOWDDL uses the default schema for the session.
PRIVILEGES
describes the PRIVILEGES associated with the object. If specified, privileges are displayed
in the form of GRANT statements. Privileges that the object acquires from the schema are
also displayed.
Considerations for SHOWDDL
• SHOWDDL cannot replicate the original object exactly.
• SHOWDDL can differ from the original DDL used to create an object.
• SHOWDDL can be used within Neoview Command Interface.
SHOWDDL displays the following information:
• At times a constraint may be disabled; SHOWDDL indicates this in its output.
• At times a table may be offline; SHOWDDL indicates this as part of its output.
• At times an active ddl lock may exist on an object; SHOWDDL indicates this in its output.
Differences Between SHOWDDL Output and Original DDL
• All column constraints (NOT NULL, PRIMARY KEY, and CHECK) are transformed into
table constraints. All NOT NULL constraints are consolidated into a single check constraint.
• Check constraints are moved out of the CREATE TABLE statement and encapsulated in a
separate ALTER TABLE ADD CONSTRAINT statement.
• SHOWDDL generates ALTER TABLE ADD COLUMN statements for each column that was
added to the table.
• All ANSI names in the output are qualified with the schema name.
• SHOWDDL displays constraint names even though they might not have been specified
during the creation of the constraint.
SHOWDDL Statement 175