If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Creation and usage of user defined data types

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-29-05, 09:34
Shefu Shefu is offline
Registered User
 
Join Date: Apr 2005
Posts: 127
Question Creation and usage of user defined data types

hi,

Is it possible to create a user defined data type in DB2

1. if yes, is there any limitations in the usage of user defined data types. like it could be used only in tables or so and so..

thanks,
Sn
Reply With Quote
  #2 (permalink)  
Old 01-06-06, 05:51
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
Examples:
Code:
CREATE DISTINCT TYPE SHOESIZE AS INTEGER WITH COMPARISONS
CREATE DISTINCT TYPE AUDIO AS BLOB(1M)
CREATE TYPE DEPT AS (DEPT NAME VARCHAR(20), MAX_EMPS INT) MODE DB2SQL
See http://publib.boulder.ibm.com/infoce...n/r0000913.htm and http://publib.boulder.ibm.com/infoce...n/r0000933.htm

No severe limitations in using these types, provided you specify all the necessary attributes (like comparisons, or conversions to basic types)
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/

Last edited by Peter.Vanroose; 01-06-06 at 06:04.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On