On Thu, Dec 26, 2013 at 12:21 PM, RSmith <rsm...@rsweb.co.za> wrote:

> There are probably a few approaches that would work, but I can think of
> none quicker/more efficient than maintaining a list of column names
> ("SELECT * from t WHERE 1 LIMIT 1" will produce it real quick)


If you want JUST the column names, you can change WHERE 1 to WHERE 0 (and,
optionally, remove the LIMIT). You don't actually need any result rows -
you just need to prepare the statement, and then you can fetch the column
names regardless of whether or not the query would produce any results (you
don't even need to step() it).

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to