Before you generate and run the DDL script, ensure that the user has the appropriate read and write permissions to access the target database.
In the
Object Explorer
view of the Developer tool, select the relational data object for which you want to create a table in the target database. If you want to create multiple tables, hold down the
Shift
and
Ctrl
keys to select multiple data objects.
Right-click a selected data object and select
Generate and Execute DDL
.
The Generate and Execute DDL dialog box appears.
In the Object Selection area, select the
Target Database Type
for which you want to generate DDL.
In the DDL Generation area, you can select the following options:
Drop Table
. Drop a table in the database before you create it. Select this option to replace a table.
Create Table
. Creates a table on the target database.
Primary Key
. Creates primary keys based on the selected data objects.
Foreign Key
. Creates foreign keys based on the selected data objects.
Copy to Clipboard
. Copies the DDL script to the clipboard.
Save As
. Saves the DDL script to a file.
In the DDL Generation area, click
Generate DDL
.
The DDL generated for the selected data objects appears in the DDL Generation area.
If you edit the DDL script generated in the DDL Generation area, you might encounter errors when you run the DDL script.
In the DDL Execution area, click
Browse
and choose a target database connection.
The
Choose Connection
dialog box lists the target database connections based on the target database type that you choose in the Object Selection area. For example, if you choose Oracle as the target database type, the Developer tool displays Oracle connections.