Search notes:

SQLPATH - tab_defs

Extract create table statements for the tables in one's schema.
The script, when run, creates the file table_defs_get_ddl.sql which in turn needs to be run. This second script creates an sql file in a directory (than manually must be created) named table_defs.
@spool table_defs_get_ddl.sql

select '@spool table_defs/'                         || table_name || '.sql'                          || chr(10) || 
       'select dbms_metadata.get_ddl(''TABLE'', ''' || table_name || ''', user) || '';'' from dual;' || chr(10) ||
       '@spool_off'
from
  user_tables 
where
  table_name not like 'TQ84%';

@spool_off
Github repository Oracle-SQLPATH, path: /tab_defs.sql

See also

Oracle: files for ORACLE_PATH / SQLPATH

Index