> Is there any way to do something along the lines of PRAGMA
> some_command(SELECT * FROM table1 JOIN table2) and have it return A, B, C,
> a, b, c as the headers?

If you insist on getting results as resultset then there's no way to
do that. But you can do the similar thing by using API like
sqlite3_column_name (http://sqlite.org/c3ref/column_name.html) or
sqlite3_column_database_name
(http://sqlite.org/c3ref/column_database_name.html) in C.


Pavel


On Wed, Jun 8, 2011 at 2:08 PM, Eric Zhao <ezha...@gmail.com> wrote:
> Hi,
>
> I find the PRAGMA table_info(*tablename)* command very helpful.
> However, sometimes I want to extract table headers for a table constructed
> by a query which does not have the exact same headers as any one table in my
> database.
>
> For example:
>
> Table 1 headers:  A, B, and C
> Table 2 headers:  a, b, and c
>
> Query:  SELECT * FROM table1 JOIN table2;
>
> Is there any way to do something along the lines of PRAGMA
> some_command(SELECT * FROM table1 JOIN table2) and have it return A, B, C,
> a, b, c as the headers?
>
> Thanks.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to