Neoview SQL Reference Manual (R2.4 SP2)

SHOWDDL Statement
“Syntax Description of SHOWDDL”
“Considerations for SHOWDDL”
“Examples of SHOWDDL”
The SHOWDDL statement describes details about objects in its display.
SHOWDDL [TABLE] object-name} [, PRIVILEGES]
object-name is:
[schema-name.]object-name
Syntax Description of SHOWDDL
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 always generates a Java signature for the SPJ.
Privileges acquired by the object or procedure from the schema are displayed and preceded
by the comments Schema level privileges”. The corresponding GRANT statements
are also commented out. Schema level privileges only need to be applied at the schema level.
PRIVILEGES Option
The PRIVILEGES option includes the GRANT statements as they apply to the option. Each
privilege is specified in a separate GRANT even if they were granted in a single statement. For
example:
GRANT ALL PRIVILEGES ON TABLE t1 TO role_user1, role_user2:
192 SQL Statements