On Sat, Jun 7, 2014 at 5:16 AM, David Q. <dav...@lelantos.org> wrote:
> I get columns names in a table by executing the query > > pragma table_info('the_table_name'); > > and using > > sqlite3_column_text(&ps,1) //index 1 = name > > for each row in the result set. > > This works, but can I rely on the index being 1 for the 'name' column? I > don't see this documented anywhere. > No. For a multi-column primary key, the columns that are part of the primary key are numbered 1, 2, 3, 4, etc, according to which column they are in the primary key. For single-column primary keys, they value will always be 1, yes. > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users