且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SQL 临时表问题

更新时间:2022-12-22 13:16:00

如果要在提交后保留CGTT中的行,则必须指定ON COMMIT PRESERVE ROWS选项"https://www.ibm.com/support/knowledgecenter/SSEPGG_11.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0053719.html" rel="nofollow noreferrer">创建全局临时表 声明.
ON COMMIT DELETE ROWS 选项在其他情况下生效,并且这样的表在提交时被清除.

If you want to preserve rows in CGTT after commit, you have to specify ON COMMIT PRESERVE ROWS option of the CREATE GLOBAL TEMPORARY TABLE statement.
ON COMMIT DELETE ROWS option is in effect otherwise, and such a table is cleared on commit.