Finding column names using DBI
31.03.2014 - SimplificatorA useful snippet, should you ever require to get the column names of a table that you are connecting through DBI:
“ruby DBI.connect(‘something’) do |con| con.execute(“SELECT * FROM FOO”).each do |row| p row.inspect p row.column_names end end