On 14 Aug 2012, at 4:14am, daedae11  <daeda...@126.com> wrote:

> If I use the group of:
> sqlite3_prepare16_v2()
> sqlite3_step()
> andsqlite3_finalize()
> 
> how can I get the names of a table's columns from a SELECT sql sentence?

To get the names of columns of a table, use the SQL command

PRAGMA table_info(table-name)

as documented here:

<http://www.sqlite.org/pragma.html#pragma_table_info>

You can use the above sequence to execute the PRAGMA command.  It works exactly 
the same way as if you were executing a SELECT command.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to