Does anyone know of a way to check if a declared temporary table exists in DB2 v8?
We have a table declared like so...
DECLARE GLOBAL TEMPORARY TABLE SESSION.TEMP_MSG(... [columns] ..)
WITH REPLACE ON COMMIT PRESERVE ROWS NOT LOGGED ON ROLLBACK PRESERVE ROWS;
Since declared temp tables aren't in the catalog, I'm not sure how to do it.
I want to create the table only if it doesn't exist (but keep the existing one if it's already there).