Forum Stats

  • 3,770,153 Users
  • 2,253,079 Discussions
  • 7,875,349 Comments

Discussions

Generating DDL - Constraints and Index Storage

1008686
1008686 Member Posts: 13
edited May 16, 2013 2:55AM in SQL Developer
Hi,

I am currently using SQL Dev Version 3.1.07 and mostly love it but have 2 questions about minor frustrations. I tried searching this forum, google, and the SQL Dev documentation but could not find any results.

#1 - When generating the DDL (this applies to both "Quick DDL" and "Database Export") of existing objects, I would like my Constraints to be included in the Table definition instead of being applied as an Alter statement. I am aware of the checkbox entitled "Constraints as Alters (only for viewing) " within Tool/Preferences/Database/Utilities/Export but checking and unchecking this does not modify the constraints in the DDL generated as I would expect. Any thoughts on how to resolve this?

To summarize.....

/*****Current output*****/
CREATE TABLE T1
(C1 NUMBER(1),
C2 NUMBER(1),
...
ALTER TABLE T1 MODIFY ("C1" NOT NULL ENABLE)


/*****Desired Output*****/
CREATE TABLE T1
(C1 NUMBER(1) NOT NULL ENABLE,
C2 NUMBER(1),
CONSTRAINT "C1" UNIQUE (C1)
...


#2 - When generating the DDL (this applies to both "Quick DDL" and "Database Export") for indexes with locally managed partitions, I would prefer to just have the word "LOCAL" listed instead of all the detailed partition information. I am aware of the checkbox entitled "Storage" within Tool/Preferences/Database/Utilities/Export but checking and unchecking this does not modify the Index DDL. Thoughts?

To summarize....

/*****Current output*****/
CREATE INDEX T1_I1 ON T1 (C1)
LOCAL
(PARTITION "CPL1998"
( SUBPARTITION "CPL1998_CA" ,
SUBPARTITION "CPL1998_FL" ,
...

/*****Desired output*****/
CREATE INDEX T1_I1 ON T1 (C1)
LOCAL;


Thanks in advance.
Tagged:

Answers

  • Gary Graham-Oracle
    Gary Graham-Oracle Member Posts: 3,256 Bronze Crown
    Hi,

    For #1, the Table viewer's SQL tab provides the desired DDL. Otherwise, all I can do is confirm the apparent lack of effect the two Export preferences you mention have. I cannot recall if they ever worked as you expect in any prior release. Perhaps the developer will see your post and comment.

    Regards,
    Gary
    SQL Developer Team
This discussion has been closed.