When we do:
create table big2 as select * from big1;
Are the indexes and constraints also copied over to the new table?
Only NOT NULL constraints are copied. See FAQ.
You can do CREATE TABLE big2 (bigid PRIMARY KEY) AS SELECT * FROM big1 tp create a primary key, but yes, for other indexes you'll want to copy and run the index creation scripts.
Just for info, there is a simple way to remember indexes to recreate them after deleting source table:
SELECT DBMS_METADATA.get_ddl('INDEX', index_name)
FROM user_indexes
WHERE TABLE_NAME = 'BIG1';
来源:https://stackoverflow.com/questions/7798727/about-create-table-as-select-ctas