当前我们使用SQL Server,并且我们有A LOT(读取大约5.000)不同的脚本创建动态临时表。从SQL Server迁移到ORACLE¿如何处理临时表?
现在我们正在迁移到ORACLE,所以我们无法在临时表上创建。
任何想法?
在此先感谢
当前我们使用SQL Server,并且我们有A LOT(读取大约5.000)不同的脚本创建动态临时表。从SQL Server迁移到ORACLE¿如何处理临时表?
现在我们正在迁移到ORACLE,所以我们无法在临时表上创建。
任何想法?
在此先感谢
哦,孩子,这是临时表的很多。您是否看过Oracle's SQL Developer tool?它是免费的,它带有一个迁移工作台,可以帮助您完成旅程。
至于临时表看来该OMWB将创建从T-SQL语句的临时表。 Find out more。
警告:我从来没有进行过这样的迁移,所以我不能保证它。但有5000个脚本迁移它必须值得您一段时间来评估它。
Oracle Global Temporary Tables怎么样?
CREATE GLOBAL TEMPORARY TABLE my_temp_table (
column1 NUMBER,
column2 NUMBER
) ON COMMIT DELETE ROWS; -- or use ON COMMIT PRESERVE ROWS to keep data until the end of your session.
你可能会想动态创建与execute immediate
表时,你需要一个临时表:
-- creating the table
begin
execute immediate q'!
create table tmp_foo_bar (
col_1 number,
col_2 varchar2(50),
etc date
) !';
end;
/
-- using the table:
insert into tmp_foo_bar values (42, 'forty-two', sysdate);
-- dropping the table:
begin
execute immediate 'drop table tmp_foo_bar';
end;
/