Question
3
Replies
556
Views
Posted: September 26, 2016
Last activity: October 4, 2016
Closed
Solved
to clone a work table in oracle database
I would like to create a copy of existing work object table along with the data and give a new name in oracle database . Would you please guide the steps to be followed in SQL developer tool?
This is possibly not as clear cut as you were hoping.
There is an option to do this in SQL Developer;
Open the table, then under the Actions drop-down there should be an option named Copy...
This should hopefully include an option to copy the data. But I believe this is all that you will get (data and table structure), so if you have any contraints/indexes then these will not be included.
If you need to ensure that the table has the appropriate indexes as well, I'd probably be inclined to open the table then copy the data from the SQL tab.
Paste this into a SQL worksheet and then change the table name, index name(s) etc... so that they are unique. And run that SQL to create the table.
Then you could populate it with: -
insert into NEWTABLE (select * from OLDTABLE);
commit;
But you may need to consider how many records this is going to insert in one go, as this may put some strain on the database.