Skip to Main Content

SQL Developer

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!

Export to DDL File from SQL Developer Data Modeler

40df2d69-f51e-4feb-b58a-80a4f35ab992Sep 23 2015 — edited Sep 24 2015

I'm exporting my last weeks relational model project to DDL in hopes of getting a quick accurate way to create my 17 tables. In the relational model, Cust_ID is the PK Yet there is nothing indicating it in the script that is created from the export to DDL File. This is what it created. Now when I right click on the customer table in the relational model view, and then pick DDL preview, it adds the alter table line. But when I do that for most of the opther tables including the phones table in the picture below, it's just the fields, no PK or PK info. How do I get the PK and FK's to show up? Thanks, Peter

CREATE TABLE Customer

(

Cust\_ID INTEGER NOT NULL ,

Name    VARCHAR2 (128) ,

Address VARCHAR2 (128 CHAR)

) ;

ALTER TABLE Customer ADD CONSTRAINT Customer_PK PRIMARY KEY ( Cust_ID ) ; <------This only shows up in the DDL Preview, not in export to DDL File. The phone table doesn't show any constraints or keys in either view. Same with almost all tables.

This is what I get for phones

CREATE TABLE Phones

(

Phone\_ID INTEGER NOT NULL ,

Phone\_Type NVARCHAR2 (10) ,

Phone\_Number     CHAR (14) ,

Customer\_Cust\_ID INTEGER NOT NULL

) ;

pkfk.PNG

This post has been answered by David Last-Oracle on Sep 24 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 22 2015
Added on Sep 23 2015
4 comments
2,152 views