>What does it do with queries that are pulling data from multiple tables?  How 
>about computed column data?
>
>Consider these queries:
>
>  SELECT a.c2, b.c3 FROM a, b WHERE a.c1 = b.c1;

For field a.c2:

* sqlite3_column_rowid(0)       returns RowID for field 'a2' in table 'a' from 
which the value is taken.
* sqlite3_column_table(0)       returns 'a'
* sqlite3_column_origin_name(0) returns 'c2'

For field b.c3:

* sqlite3_column_rowid(1)       returns RowID for field 'c3' in table 'b' from 
which the value is taken.
* sqlite3_column_table(1)       returns 'b'
* sqlite3_column_origin_name(1) returns 'c3'

>  SELECT c1 + c2 FROM a;

Computed data like c1 + c2 is not as such updatable.

* sqlite3_column_rowid(0)       returns -1 (or an error, depending on how it 
will be implemented) because the value is not taken from one single column and 
row.
* sqlite3_column_table(0)       returns NULL
* sqlite3_column_origin_name(0) returns NULL

Regards,

Ralf 

Reply via email to