Online Documentation for SQL Manager for DB2
Aliases
An Alias is an alternative name used to identify a table, a view, a database, or a nickname. An alias can be used in SQL statements to refer to a table or view in the same DB2 subsystem or a remote DB2 subsystem.
To create a new alias:
- select the Database | New Object... main menu item;
- select Alias in the Create New Object dialog;
- edit alias properties using the appropriate tabs of Alias Editor.
Hint: To create a new alias, you can also right-click the Aliases node of the DB Explorer tree and select the New Alias... context menu item.
To create a new alias with the same properties as one of existing aliases has:
- select the Database | Duplicate Object... main menu item;
- follow the instructions of Duplicate Object Wizard.
Alternatively, you can right-click an alias in the DB Explorer tree and select the Duplicate Alias <alias_name>... context menu item.
Duplicate Object Wizard allows you to select the database to create a new alias in, and to edit the result SQL statement for creating the alias.
To edit an existing alias:
- select the alias for editing in the DB Explorer tree (type the first letters of the alias name for quick search);
- right-click the object and select the Edit Alias <alias_name>... context menu item, or simply double-click the alias;
- edit alias definition using the appropriate tabs of Alias Editor.
To drop an alias:
- select the alias to drop in the DB Explorer tree;
- right-click the object and select the Drop Alias <alias_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 alias;
Ctrl+O to edit the selected alias;
Shift+Del to drop the object from the database.