I am used to see the DDL and only after seeing that I realize I have forgotten to design something. I know File | Export | DDL File will give me the DDL for the table but it takes me many clicks to get that. Is there any easier way to see the DDL for a table?
Yes! Right-click on the table in the Relational Model canvas and select DDL Preview:
That will show you the DDL for that table.
TIP: if you keep the DDL Preview screen open and click on another table in that Relational Model, you will get the DDL for that table displayed in the screen.
Note: if the physical model is closed the DDLs will be very general without any physical properties. If the physical model is closed the DDL might look like this:
CREATE TABLE Customer
(
CustNO NUMBER (10) NOT NULL ,
Name VARCHAR2 (100) NOT NULL
) ;
ALTER TABLE Customer ADD CONSTRAINT Customer_PK PRIMARY KEY ( CustNO ) ;
And if it is open it might look like this:
CREATE TABLE Customer
(
CustNO NUMBER (10) NOT NULL ,
Name VARCHAR2 (100) NOT NULL
)
PCTFREE 10 PCTUSED 40 TABLESPACE TableSpace1 LOGGING STORAGE
(
PCTINCREASE 0 MINEXTENTS 1 MAXEXTENTS UNLIMITED FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
) ;
ALTER TABLE Customer ADD CONSTRAINT Customer_PK PRIMARY KEY ( CustNO ) ;
Very handy for agile database development!
Don’t forget to create/open the physical model if you want to see things like partitions, storage parameters, etc in your DDL!
Great comment, I’ll add that. Thanks!