0

I want to create tables from one schema to another. i.e. complete table script. eg: Let say in schema 'A' tables are present and need to create in schema 'B'. Can we do this with a scripts as there are lot of tables? or manually is the only option? Could anyone pls suggests.

Thanks.

1 Answers1

0

Yes it can be done by a script. Below, you will find the example of how to retrieve the DLL of a single Table. Now, using this example, you can create the script in no time.

SELECT DBMS_METADATA.get_ddl ('TABLE', table_name, owner)
FROM   all_tables
WHERE  owner      = 'OWNER'
AND    table_name = 'TABLE_NAME';

If you want the script directly, the following Link will provide you with your desired result:

How to generate entire DDL of an Oracle schema (scriptable)?

Paul C.
  • 167
  • 1
  • 8