Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DDL script of a table

634871Mar 8 2011 — edited Mar 8 2011
Hi,

I'm working on UNIX Oracle 11g.

I'm trying to get the ddl scripts (CREATE TABLE) of few tables. I tried using the dbms_metadata.get_ddl, it gives the script, but i'm not interested in the constraints , indexes, tablespaces and other details it gives. I just need the table schema, can anyone tell me how this can be done.

--what i'm getting from get_ddl
CREATE TABLE xxx(
xxx VARCHAR2,
xxx NUMBER PRIMARY KEY) INDEX TABLESPACEs...

--what i need
CREATE TABLE xxx(
xxx VARCHAR2,
xxx NUMBER);

Many Thanks!

Edited by: user631868 on 08-Mar-2011 04:27
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 5 2011
Added on Mar 8 2011
7 comments
1,188 views