Online Documentation for SQL Manager for DB2
UDS Types
A UDS Type is a user-defined (structured) data type that is internally represented as an existing type (its source type), but is considered to be a separate and incompatible type for semantic purposes. A structured type may be a subtype allowing attributes to be inherited from a supertype. A structured type is a user-defined data type containing one or more named attributes, each of which has a data type.
To create a new UDS Type:
- select the Database | New Object... main menu item;
- select UDS Type in the Create New Object dialog;
- edit UDS Type properties using the appropriate tabs of UDS Type Editor.
Hint: To create a new UDS Type, you can also right-click the UDS Types node of the DB Explorer tree and select the New UDS Type... context menu item.
To create a new UDS Type with the same properties as one of existing UDS Types has:
- select the Database | Duplicate Object... main menu item;
- follow the instructions of Duplicate Object Wizard.
Alternatively, you can right-click a UDS Type in the DB Explorer tree and select the Duplicate UDS Type <uds_type_name>... context menu item.
Duplicate Object Wizard allows you to select the database to create a new UDS Type in, and to edit the result SQL statement for creating the UDS Type.
To edit an existing UDS Type:
- select the UDS Type for editing in the DB Explorer tree (type the first letters of the UDS Type name for quick search);
- right-click the object and select the Edit UDS Type <uds_type_name>... context menu item, or simply double-click the UDS Type;
- edit UDS Type definition using the appropriate tabs of UDS Type Editor.
To drop a UDS Type:
- select the UDS Type to drop in the DB Explorer tree;
- right-click the object and select the Drop UDS Type <uds_type_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 UDS type;
Ctrl+O to edit the selected UDS type;
Shift+Del to drop the object from the database.