On 21 Sep 2012, at 2:56pm, Marco Bambini <ma...@sqlabs.net> wrote: > is there a way to extract column names involved in a WHERE clause of a query > without manually parse the select statement? > > For example from a query like: > SELECT * FROM myTable WHERE col1=… AND col2=…; > I would need to extract both col1 and col2.
If everything about your setup and query is simple, than you can use this function from the API <http://www.sqlite.org/capi3ref.html#sqlite3_column_name> Things get hairy when your SELECT includes a JOIN or returns a calculation instead of just a straight copy of a table column. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users