16.10.2015 Views

Getting Started with IBM Data Studio for DB2

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

98 <strong>Getting</strong> <strong>Started</strong> <strong>with</strong> <strong>IBM</strong> <strong>Data</strong> <strong>Studio</strong> <strong>for</strong> <strong>DB2</strong><br />

Figure 2.32 – Editing table data<br />

You can edit the table’s contents by selecting a cell and changing its value. After you have<br />

changed a value, be sure to press the Enter key or select another cell. The cell is<br />

highlighted, and an asterisk appears in the tab name of the view to show that the table was<br />

changed, but the changes have not yet been saved and committed to the database. You<br />

can commit changes to database by saving the editor changes, either by using the<br />

keyboard shortcut, Ctrl+S or by selecting File -> Save.<br />

Note:<br />

After you update a value in the table, you must press the Enter key or select another cell<br />

in the table. If you do not per<strong>for</strong>m this step and close the tab, you will not be prompted to<br />

save the changes, and the changes will not be saved to the database.<br />

2.7.2 Generate DDL<br />

When you must duplicate a database table, the simplest way to complete this task is to<br />

generate a DDL script that can be run on the target database. You can generate DDL<br />

directly from many database objects, including tables, by right-clicking those objects in the<br />

object list editor and selecting Generate DDL.<br />

The Generate DDL wizard lets you select several options to be included in the generated<br />

DDL, including drop statements, fully qualified and delimited names, dependent object, and<br />

so <strong>for</strong>th. After choosing the options, the generated DDL is displayed and you can specify<br />

whether to run this DDL against a database server or simply save it into a local project <strong>for</strong><br />

later use. For example, Figure 2.33 shows the generated DDL <strong>for</strong> thePRODUCT table.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!