SQL/MX 2.x Reference Manual (G06.24+, H06.03+)

MXCI Commands
HP NonStop SQL/MX Reference Manual523725-004
4-71
Examples of SHOWDDL
SHOWDDL displays only whether an SQL/MP table has DCOMPRESS on or off
and does not distinguish between compression methods 1 and 2. DCOMPRESS is
displayed only with the SQLMP option.
KEYTAG is displayed as an unsigned small integer because of how it is stored.
KEYTAG is entered as two bytes of char data, but SHOWDDL shows the
converted values. KEYTAG is displayed only with the SQLMP option.
RECLENGTH is not supported because it applies only to relative sequenced files
which are not supported by NonStop SQL/MX.
DSLACK, ISLACK, and SLACK for indexes are not displayed by SHOWDDL.
If you do not specify the SQL/MP option, SQL/MP NOT NULL column constraints
are converted to NOT NULL NOT DROPPABLE constraints.
SHOWDDL on an SQL/MP view includes added correlated names:
CREATE VIEW V1 ( N ) AS SELECT N FROM
\FIGARO.$DATA05.DEANCAT.T1 T1 ;
When displaying an SQL/MP view in SQL/MX syntax (not using SQLMP option),
you must manually remove correlated Guardian location names because they are
not valid SQL/MX syntax:
CREATE VIEW V1 ( N ) AS SELECT N FROM T1 T1 ;
Headings for SQL/MP views are not supported.
Added check not null constraints do not have accompanying "-- NOT NULL "
comments by columns that they determine are not null, as in the output for an
SQL/MX table. This situation is caused by differences in how NonStop SQL/MP
and NonStop SQL/MX implement NOT NULL constraints.
SHOWDDL does not display any table or column privilege information for the table.
Examples of SHOWDDL
This is an example of SHOWDDL on an SQL/MX table that contains unique and
primary key constraints:
>>CREATE TABLE CAT.SCH.T1
(N INT NOT NULL,
C INT NOT NULL UNIQUE,
CONSTRAINT PK PRIMARY KEY (N) NOT DROPPABLE)
STORE BY (C DESC, N)
ATTRIBUTE MAXEXTENTS 600;
>>SHOWDDL CAT.SCH.T1;
CREATE TABLE CAT.SCH.T1
(
N INT NO DEFAULT -- NOT NULL NOT DROPPABLE
, C INT NO DEFAULT -- NOT NULL NOT DROPPABLE
, CONSTRAINT CAT.SCH.PK PRIMARY KEY (N ASC) NOT DROPPABLE