# Ruby ODBC: what is returned by 'columns'?

**URL:** <https://www.ruby-forum.com/t/ruby-odbc-what-is-returned-by-columns/80054>\
**Category:** Ruby\
**Created:** [December 21, 2006, 1:47am UTC](https://www.ruby-forum.com/t/ruby-odbc-what-is-returned-by-columns/80054 "2006-12-21T01:47:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_McMahon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/74df32/32.png) [@Chris\_McMahon](https://www.ruby-forum.com/u/Chris_McMahon)\
**Post date:** [December 21, 2006, 1:47am UTC](https://www.ruby-forum.com/t/ruby-odbc-what-is-returned-by-columns/80054/1 "2006-12-21T01:47:03Z")

</div>

conn = ODBC::connect(‘db’)  
cols = conn.columns(‘table’)  
cols.each do |col|  
puts col.inspect  
end

[“db\_name”, “dbo”, “table”, “Created\_”, 11, “smalldatetime”, 16, 16, 0,  
nil, 1, nil, nil, 9, 3, nil, 1, “YES”, 111]  
[“db\_namet”, “dbo”, “table”, “Desc\_”, 12, “varchar”, 100, 100, nil,  
nil, 1, nil, nil, 12, nil, 100, 2, “YES”, 39]  
etc.

it’s pretty clear that cols[x][3] is the column name and cols[x][5] is  
the column data type, and [0], [1], [2] and maybe [6] are pretty clear,  
but I’ve been unable to find out what the other values returned in the  
array represent. Is that written down anywhere?
