Online Documentation for SQL Manager for DB2

Modules


The Module is a schema object that is intended to be a collection of other database objects. This object is available only for database server version 9.7 and higher.

 

 

Creating Modules

 

To create a new SQL variable:

Hint: To create a new SQL variable, you can also right-click the Modules node of the DB Explorer tree and select the New Module... context menu item.

 

To create a new SQL variable with the same properties as one of existing SQL variables has:

Alternatively, you can right-click a SQL variable in the DB Explorer tree and select the Duplicate Module<module_name>... context menu item.

 

Duplicate Object Wizard allows you to select the database to create a new SQL variable in, and to edit the result SQL statement for creating the SQL variable.

 

 

Editing Modules

 

To edit an existing SQL variable:

  • select the SQL variable for editing in the DB Explorer tree (type the first letters of the SQL variable name for quick search);
  • right-click the object and select the Edit Module <module_name>... context menu item, or simply double-click the SQL variable;
  • edit SQL variable definition using the appropriate tabs of Module Editor.

 

Dropping Modules

 

To drop a SQL variable:

  • select the SQL variable to drop in the DB Explorer tree;
  • right-click the object and select the Drop Module <module_name>... context menu item;
  • confirm dropping in the dialog window.

 

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new module;

Ctrl+O to edit the selected module;

Shift+Del to drop the object from the database.