Online Documentation for SQL Manager for DB2

UD Types


A User-defined Type is a data type that is not native to the database manager and was created by a user.

 

 

Creating UD Types

 

To create a new UD Type:

Hint: To create a new UD Type, you can also right-click the UD Types node of the DB Explorer tree and select the New UD Type... context menu item.

 

To create a new UD Type with the same properties as one of existing UD Types has:

Alternatively, you can right-click a UD Type in the DB Explorer tree and select the Duplicate UD Type <ud_type_name>... context menu item.

 

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

 

 

Editing UD Types

 

To edit an existing UD Type:

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

 

Dropping UD Types

 

To drop a UD Type:

  • select the UD Type to drop in the DB Explorer tree;
  • right-click the object and select the Drop UD Type <ud_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 UD type;

Ctrl+O to edit the selected UD type;

Shift+Del to drop the object from the database.