Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2005
    Posts
    127

    Question Unanswered: 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

  2. #2
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    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)
    Last edited by Peter.Vanroose; 01-06-06 at 07:04.
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •