You know certainly about .mode column & headers on, to show datas of a sqlite database. But how to obtain the same result wth in Ruby script?
For example, to add it to my own script:
begin
require 'sqlite3'
db = SQLite3::Database.open('test_albums.db')
db.execute("select * from albums where ecoute = 2") do |result|
puts result.join(' - ')
end
end
Very thanks!