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.

 

 

Creating UDS Types

 

To create a new UDS Type:

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:

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.

 

 

Editing UDS Types

 

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.

 

Dropping UDS Types

 

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.