Q
Problem solve Get help with specific problems with your technologies, process and projects.

Copying selected tables from one user to another

I want to copy only selected table structures from one user to another user in Oracle.

I want to copy only selected table structures from one user to another user in Oracle.
Sign on as SYSTEM and use the CREATE TABLE AS SELECT (CTAS) command similar to the following:
CREATE TABLE bob.tableX AS SELECT * FROM tom.tableX;
The above will create a table owned by BOB as a duplicate of the table that is currently owned by TOM. If you only want the structure and no rows of data, use the following:
CREATE TABLE bob.tableX AS SELECT * FROM tom.tableX WHERE 0=1;

Dig Deeper on Oracle database backup and recovery

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close