Skip to content
Advertisements

DDL Extract for tables

DDL Extract for tables

 

ALL Tables from user

set heading off;
set echo off;
Set pages 999;
set long 90000;

spool export_tables_ddl.sql

select dbms_metadata.get_ddl(‘TABLE’,table_name,’TESTUSER’) from user_tables;

 

spool off

 

*table_name — Don’t mention anything

 

 

A table

select dbms_metadata.get_ddl(‘TABLE’,’EMPLOYEE’) from dual

 

*EMPLOYEE – table name

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: