如何在oracle中用SQL创建临时表?

需要创建一个临时表,请举例说明,谢谢!
---------------------------------------------------------------

是TEMPORARY
CREATE GLOBAL TEMPORARY TABLE flight_schedule (
startdate DATE,
enddate DATE,
cost NUMBER)

---------------------------------------------------------------

create proecdure name_pro
as
str varchar2(100);
begin
str:='CREATE GLOBAL TEMPORARY TABLE TABLENAME ON COMMIT PRESERVE ROWS as select * from others_table';
execute immediate str;
end;
/

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus