📜  oracle 复制表 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:07.299000             🧑  作者: Mango

代码示例1
-- Copy a table (datas, columns and storage parameters)
CREATE TABLE my_new_table AS SELECT * FROM my_source_table;
-- Use NOLOGGING, and PARALLEL if allowed for faster copy
CREATE TABLE my_new_table
    PARALLEL 10 NOLOGGING
AS
SELECT /*+ parallel(10) */ * FROM my_source_table;
-- To create an empty table:
CREATE TABLE my_new_table AS SELECT * FROM my_source_table
    WHERE rownum = 0;