On 19 May 2010, at 12:05pm, Andrew Rodland wrote: > Is there any possibility that in a future version of SQLite, pragma > table_info > or some other pragma could return a simple boolean "this column is the rowid" > indicator? As demonstrated under "Goofy Behavior Alert" at > http://www.sqlite.org/lang_createtable.html#rowid it is possible (if > unlikely) > for a column to appear as type='INTEGER' and pk=1 in the pragma table_info > results and yet *not* be the rowid.
Sometimes no columns are the rowid. For instance, any case where there are no suitable columns: CREATE TABLE texts(thisText TEXT) This table does still have a rowid, but you can't access it using any of the columns you've declared. Rather than find out what SQLite has done internally to create a rowid, might it be possible for you to refer explicitly to the column "_ROWID_" in your code ? Unless this name is used in the TABLE definition, it is guaranteed to return the rowid values. SELECT _rowid_, * FROM texts Simon. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

