Declare temp table inside UserDefined Function in DB2 AS400
问题 How to create user defined function with declare temporary table in AS400? I can't create a temporary table under parent procedure, because i'm using Parallel Jobs. So i need to create temporary table inside function only helps me. Did anybody knows the solution, kindly update here friends. 回答1: example of temporary table : DECLARE GLOBAL TEMPORARY TABLE nametemporarychoice AS ( YOURQUERYHERE ) WITH DATA WITH REPLACE NOT LOGGED; you can use your table like this: select * from qtemp