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.
To create a new SQL variable:
- select the Database | New Object... main menu item;
- select Module in the Create New Object dialog;
- edit SQL variable properties using the appropriate tabs of Module Editor.
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:
- select the Database | Duplicate Object... main menu item;
- follow the instructions of Duplicate Object Wizard.
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.
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.
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.