Duplicate a Oracle Table

a.bodi

Member
I would know what is the best kind to do a copy of a table (Data, Indexes, Checks, ...)
I copy Field by Field and Record by Record but it's long !!

Thanks for your help
 
The easiest way to copy a table is like this:

create table emp_copy as select * from emp

Now your table does not have any indexes or constraints (except not null constraints), so you will have to recreate them. Also note that the new table will be located in the default tablespace with the default storage options from that tablespace. You may wish to override this as well in the "create table" statement.

------------------
Marco Kalter
Allround Automations
 
Back
Top