Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2005
    Posts
    42

    Unanswered: how to generate ddl for multile tables in oracle 10g

    Hi,

    Can any body tell me how to generate ddl for multiple table in oracle10g.It is possible for single table but as we select multiple table option goes

    Regards
    Bala

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Perhaps using the DBMS_METADATA package? Something like presented here?

  3. #3
    Join Date
    Sep 2005
    Posts
    42

    Not working 4 multiple tables

    I tried using "select dbms_metadata.get_ddl" but is not use for multiple tables

  4. #4
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  5. #5
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    You can also use a SQL statement, to generate the statements that will be needed
    Code:
    select 'select dbms_metadata.get_ddl('''||object_type||''','''||object_name||''') from dual;' 
    from all_objects
    where owner = user
    and object_type in ('TABLE','INDEX')
    order by object_type desc

  6. #6
    Join Date
    Jul 2003
    Posts
    2,296
    or use export/import

    after the export, use import with show=y and it will only show (not import) the scripts to create the objects.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •