DECLARE GLOBAL TEMPORARY TABLE SESSION.TEMP_EMP
(
    EMPNO CHAR(6) NOT NULL,
    SALARY DECIMAL(9, 2),
    BONUS DECIMAL(9, 2),
    COMM DECIMAL(9, 2)
) ON COMMIT PRESERVE ROWS;

DECLARE GLOBAL TEMPORARY TABLE TEMPTAB1
LIKE USER1.EMPTAB
INCLUDING IDENTITY
ON COMMIT PRESERVE ROWS;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE
(
    EMPNO CHAR(6) NOT NULL
);

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE
(
    EMPNO CHAR(6) NOT NULL
)
ORGANIZE BY ROW;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE
(
    EMPNO CHAR(6) NOT NULL
)
ORGANIZE BY COLUMN;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE
(
    EMPNO CHAR(6) NOT NULL
)
ON COMMIT DELETE ROWS;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE
(
    EMPNO CHAR(6) NOT NULL
)
ON COMMIT PRESERVE ROWS;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE
(
    EMPNO CHAR(6) NOT NULL
)
LOGGED;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE
(
    EMPNO CHAR(6) NOT NULL
)
NOT LOGGED ON ROLLBACK DELETE ROWS;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE
(
    EMPNO CHAR(6) NOT NULL
)
NOT LOGGED ON ROLLBACK PRESERVE ROWS;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE
(
    EMPNO CHAR(6) NOT NULL
)
WITH REPLACE;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE
(
    EMPNO CHAR(6) NOT NULL
)
IN USERTEMPSPACE1;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE
(
    EMPNO CHAR(6) NOT NULL
)
DISTRIBUTE BY RANDOM;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE
(
    EMPNO CHAR(6) NOT NULL
)
DISTRIBUTE ON RANDOM;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE
(
    EMPNO CHAR(6) NOT NULL
)
DISTRIBUTE BY HASH (EMP_NO);

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE AS
(
    SELECT COL1
    FROM MY_SCHEMA.MY_TABLE
)
WITH NO DATA;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE AS
(
    SELECT COL1
    FROM MY_SCHEMA.MY_TABLE
)
WITH DATA;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE AS
(
    SELECT COL1
    FROM MY_SCHEMA.MY_TABLE
)
WITH NO DATA
INCLUDING DEFAULTS;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE AS
(
    SELECT COL1
    FROM MY_SCHEMA.MY_TABLE
)
WITH NO DATA
INCLUDING COLUMN DEFAULTS;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE AS
(
    SELECT COL1
    FROM MY_SCHEMA.MY_TABLE
)
WITH NO DATA
EXCLUDING DEFAULTS;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE AS
(
    SELECT COL1
    FROM MY_SCHEMA.MY_TABLE
)
WITH NO DATA
EXCLUDING COLUMN DEFAULTS;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE AS
(
    SELECT COL1
    FROM MY_SCHEMA.MY_TABLE
)
WITH NO DATA
EXCLUDING IDENTITY;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE AS
(
    SELECT COL1
    FROM MY_SCHEMA.MY_TABLE
)
WITH NO DATA
INCLUDING IDENTITY;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE AS
(
    SELECT COL1
    FROM MY_SCHEMA.MY_TABLE
)
WITH NO DATA
EXCLUDING IDENTITY COLUMN ATTRIBUTES;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE AS
(
    SELECT COL1
    FROM MY_SCHEMA.MY_TABLE
)
WITH NO DATA
INCLUDING IDENTITY COLUMN ATTRIBUTES;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE AS
(
    SELECT COL1
    FROM MY_SCHEMA.MY_TABLE
)
WITH DATA
DISTRIBUTE ON HASH (COL1)
IN USERTEMPSPACE1
ORGANIZE BY ROW
ON COMMIT PRESERVE ROWS
NOT LOGGED
WITH REPLACE;

DECLARE GLOBAL TEMPORARY TABLE MY_DGTT_TABLE AS
(
    SELECT COL1
    FROM MY_SCHEMA.MY_TABLE
)
WITH DATA
IN USERTEMPSPACE1
DISTRIBUTE ON HASH (COL1)
ORGANIZE BY COLUMN
ON COMMIT PRESERVE ROWS
NOT LOGGED;
