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 > Informix > Meaning of syscolumns.coltype ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-21-11, 05:10
databasepie databasepie is offline
Registered User
 
Join Date: Oct 2011
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 10-31-11, 11:14
begooden-it begooden-it is offline
Registered User
 
Join Date: Sep 2011
Location: Pont l'Abbé, Brittany, France
Posts: 183
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
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