Following code snippet is used to create GLOBAL TEMPORARY TABLE, INSERT into the created temporary table, SELECT the same for the output.
db2 "declare global temporary table temp1(col1 integer,col2 varchar(30)) with replace"
db2 "insert into temp1 values(1,a)"
db2 "select * from session.temp2"
COL1 COL2
----------- ------------------------------
0 record(s) selected.
In the above SELECT statement output it shows "0 record(s) selected", after inserting a record previously.
What is the problem? Can any one resolve the same?.
Thanks,
Kamesh.