Q:

How to get a list of column names

Is it possible to get a row with all column names of a table like this?
|id|foo|bar|age|street|address|

I don't like to use Pragma table_info(bla).

A:

SELECT sql FROM sqlite_master
WHERE tbl_name = 'table_name' AND type = 'table'

Then parse this value with Reg Exp (it's easy) which could looks similar to this: [(.*?)]
Alternatively you can use:
PRAGMA table_info(table_name)

A:

If you are using the command line shell to SQLite then .headers on before you perform your query. You only need to do this once in a given session.

A:

Yes, you can achieve this by using the following commands:
sqlite> .headers on
sqlite> .mode column

The result of a select on your table will then look like:
id          foo         bar         age         street      address
----------  ----------  ----------  ----------  ----------  ----------
1           val1        val2        val3        val4        val5
2           val6        val7        val8        val9        val10

