Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2006

    Question Unanswered: different data type

    Hi There,

    I wonder if the following pair will be considered as same data type or not:

    char(15) - char(18)
    char(15) - varchar(18)

    When I link the two columns char(15) to char(18), would DB2 do casting or not?


  2. #2
    Join Date
    Nov 2002
    They are not the same

    char column size is what it is defined as

    varchar is data size + 2 bytes I believe

    And depending on the version, one will cause a scan, others will not

    I believe after V6 it won't...but it's still not a good idea to have the same type of data with different definitions

    Why does it?

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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