我想使用ANSI SQL创建一个临时表,以便我可以使用相同的查询在ORACLE和MSSQL中创建表。
答案 0 :(得分:-1)
Create temporary table using the following statement
CREATE GLOBAL TEMPORARY TABLE my_temp_table (
id NUMBER,
description VARCHAR2(20)
)
ON COMMIT PRESERVE ROWS;
ON COMMIT PRESERVE ROWS clause indicates that rows should persist beyond the end of the transaction. They will only be removed at the end of the session.