How can I generate (or get) a ddl script on an existing table in oracle? I have to re-create them in Hive
问题 How can I generate a DDL script on an existing table in oracle? I am working on a project where I have to re-create some tables that are present in Oracle table into Hive. 回答1: If your SQL client doesn't support this, then you can use the dbms_metadata package to get the source for nearly everything in your database: For a table use something like this: select dbms_metadata.get_ddl('TABLE', 'YOUR_TABLE_NAME') from dual; You can also do this for all tables at once: select dbms_metadata.get_ddl