Am 29.06.2009 um 06:57 schrieb BareFeet: > Hi, > > Is there any way in the command line to get the columns in a query > result? > > For example, given an ad-hoc SQL command, such as: > > begin; > insert into MyTableOrView select * from SomeSource; > select * from MyTableOrView join SomeOtherTableOrView where condition; > end; > > how can I get the column headers in the result? > > I know I can get the column info of a table using pragma table_info, > but I don't think that works for an ad-hoc query.
use ".headers on" in the commandline (or run the tool with the -header option) - the first line will contain the column names. HTH, </jum> _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users