This
query gives you the DDL statement for any table. Notice we have pass ‘TABLE’ as
first parameter. This query can be generalized to get DDL statement of any
database object. For example, to get DDL for a view just replace first argument
with ‘VIEW’ and second with your view name and so.
SELECT DBMS_METADATA.get_ddl ('TABLE',
'TABLE_NAME', 'USER_NAME') FROM DUAL;

0 Comments