Data Definition Language (DDL) is used to describe an object in SQL. When you model a table in your relational model using Oracle SQL Developer Data Modeler, you are probably very curious as to the code that is being generated to represent that object.
You can peek into this code using your mouse –
You can right-mouse-click on an object and choose ‘DDL Preview,’ or you can use the keyboard shortcut, Alt+Shift+I.
Here’s trick #1:
Mouse Over an object to get the DDL
Once the previewer is open, it’s dynamic. So click on another object in the model, and it will auto-refresh.
And trick #2:
Change How the DDL is generated on the fly
Open the Preferences dialog under the Tools menu and proceed to the DDL page. There you can specify how to generate the DDL including:
- Use Quoted Identifiers — this drives me nuts!
- Generate Inline Column Constraints
- Generate Comments in RDBMS
After you make this change, simply click back into the object and the DDL will auto-refresh based on your new setting. Here’s an example of how that looks with Quoted Identifiers.
Previewing the Code
You can expect more options and flexibility when it comes to generating the DDL in upcoming versions of SQL Developer Data Modeler. If you want to see something in particular be sure to add the request formally, or leave me a comment here.