Introduction
This tutorial will show you how to edit the descriptions of tables and columns in DB2 using IBM Data Studio.
There are three options in IBM Data Studio called Activities from which you can view the code.
- Administer Databases
- Develop SQL and Routines
- Tune Queries
All these options can be selected from the Activity option menu buttons.

Editing table descriptions
IBM Data Studio has some options for editing the description of tables in a DB2 database, as described next.
Option 1 – Using the Administer Databases activity option
- In the left pane of the screen that is displayed, expand the All Databases node and select the appropriate database to expand its objects tree, then select Tables.
- In the upper right pane, right-click on the desired table and select Alter in the context menu.

- In the lower right pane, select the Documentation option and start writing or editing the table description.
- Click on the button Save Changes when done.

After saving any changes, you need to generate a DDL to deploy the changes. You can do this using any of the following two options:
- If the change plan is active and displayed in the change plan toolbar (you are viewing the previous screen), click on the Generate DDL button located in the upper pane.

- If the change plan is not active (you are viewing a different screen than the previous one), in the Administration Explorer, click the Change Plans folder in the database. From the Object List, right-click on the change plan to deploy and select the Review and Deploy option.

Now you will see a progress screen and then you will get the review and deploy screen, where you can review the commands that will be executed. Select the option Deploy the change commands and click on the Finish button.

Option 2 – Using the Develop SQL and Routines or the Tune Queries activity option
- In the left pane of the screen that is displayed, select the Data Source Explorer tab and expand the Database Connections node.
- Select the appropriate database to expand its objects tree.
- Expand the Schemas node and the schema name where the table is located.
- Expand the Tables node and right click on the desired table.
- Choose the Alter option in the context menu.

- In the lower right pane, select the Documentation option and start writing or editing the table description.
- Click on the Save Changes button when done.

After saving any changes, you need to generate a DDL to deploy the changes, as described in option 1.
Option 3 – Using the pictorial path
- In the upper right pane, click on the last icon of the pictorial path to display the list of options, then select Tables.

- Again, in the upper right pane, right-click on the desired table and select Alter in the context menu.

- In the lower right pane, select the Documentation option and start writing or editing the table description.
- Click the button Save Changes when done.

After saving any changes, you need to generate a DDL to deploy the changes, as described in option 1.
Editing column descriptions
IBM Data Studio also provides some options for editing the description of columns in a DB2 database, as described next.
Option 1 – Using the Administer Databases activity option
- In the left pane of the screen that is displayed, expand the All Databases node and select the appropriate database to expand its objects tree, then select Tables.
- In the upper right pane, right-click the desired table and select Alter in the context menu.

- Again, in the upper pane, double-click the table name to show its list of columns, then select a column.
- In the lower pane select the Documentation option and start writing or editing the column description.
- Click the button Save Changes when done.

After saving any changes, you need to generate a DDL to deploy the changes, as described in option 1 of the section Editing table descriptions.
Option 2 – Using the Develop SQL and Routines or the Tune Queries activity option
- In the left pane of the screen that is displayed, select the Data Source Explorer tab and expand the Database Connections node.
- Select the appropriate database to expand its objects tree.
- Expand the Schemas node and select the schema name where the table is.
- Expand the Tables node and expand the desired table node.
- Expand the Columns node and select a column.
- In the lower right pane, select the Documentation option.
- Click the Edit button and start writing or editing the column description.

- Click the button Save Changes when done.

After saving any changes, you need to generate a DDL to deploy the changes, as described in option 1 of the section Editing table descriptions.
 
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                 
                                                             
                                                             
                                                             
                                                             
                                                                 
                                                             
                                                             
                                                                 
                                                             
                                                             
                                                             
                                                             Rene Castro
                                                                        Rene Castro
                                 IBM Data Studio
                                                                IBM Data Studio
                                 SQL Server Management Studio (SSMS)
                                                                                                SQL Server Management Studio (SSMS)
                                             MySQL Workbench
                                                                                                MySQL Workbench
                                             Oracle SQL Developer
                                                                                                Oracle SQL Developer
                                             pgAdmin
                                                                                                pgAdmin
                                             phpMyAdmin
                                                                                                phpMyAdmin
                                             DataGrip
                                                                                                DataGrip
                                             Toad for Oracle
                                                                                                Toad for Oracle
                                             Toad for SQL Server
                                                                                                Toad for SQL Server
                                             Toad for IBM DB2
                                                                                                Toad for IBM DB2
                                             Dbeaver
                                                                                                Dbeaver
                                             SQL Workbench/J
                                                                                                SQL Workbench/J
                                             Aqua Data Studio
                                                                                                Aqua Data Studio