Declaring (Creating)
DECLARE GLOBAL TEMPORARY TABLE SESSION.EMP_TABLE (EMPID INTEGER NOT NULL, EMPNAME CHAR(20)) [ON COMMIT DELETE ROWS | ON COMMIT PRESERVE ROWS]
Even if you do not give the qualifier SESSION, the table will be created as SESSION.EMP_TABLE.
Temporary tables cannot be created with our own qualifier.
Inserting
INSERT INTO SESSION.EMP_TABLE VALUES(1,'KARTHIK')
Fetching
SELECT * FROM SESSION.EMP_TABLE
what happen to temporary tables when program abends.