Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2011
    Posts
    1

    Unanswered: Meaning of syscolumns.coltype ?

    Hello, can someone please give me a hint, where to find the meaning of the coltype column in syscolumns?

    select coltype, count(coltype)
    FROM "informix".systables t, "informix".syscolumns c
    WHERE t.tabid = c.tabid
    AND t.tabtype = 'T' -- exclude views, synonyms, etc.
    AND t.tabid >= 100 -- exclude the system catalog
    group by coltype
    order by coltype

    coltype count(coltype)
    0 20680
    1 187
    2 1762
    3 120
    5 2920
    7 75
    8 401
    10 1535
    11 7
    12 8
    13 629
    17 14
    40 2
    41 1
    256 4101
    257 21
    258 934
    259 3
    261 419
    262 43
    263 9
    264 38
    266 129
    269 62
    273 2
    274 9
    296 2

  2. #2
    Join Date
    Sep 2011
    Location
    Pont l'Abbé, Brittany, France
    Posts
    381
    Provided Answers: 1
    Hi ,

    coltype speaks by itself: it means the datatype of the column :-)
    each column has a datatype, ranging from usual ones ( integer, smallint, serial, float, smallfloat, date, datetime, decimal, char, varchar, nchar), and custom or opaque ones used generally for datablades or custom functions ( blob,clob, text,byte etc...)

    Each coltype value refers either to a specific type ( integer, smallint etc...), or variable one using a formula on this number ( char, varchar, datetime etc).

    You can find the definition of those type in $INFORMIXDIR/incl/public/sqltypes.h

    The variable types generally use a algoryth based on modulo 256 to get the data type and length.

    Hope this helps
    Eric

Posting Permissions

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