On Thu, Feb 19, 2009 at 10:45 PM, His Nerdship <slgdoug...@optusnet.com.au>wrote:
> > Thank you Thomas, that was most helpful. > I have just found the ROWID information > (http://sqlite.org/lang_createtable.html#rowid) - this is what I was > looking > for! You have to know something exists before you can look for it.... > I take it this value will not change, even if the contents of its row > change? > Be careful. Yes, that value *can* change if you depend on the implicit ROWID. Specifically, if you delete rows and then VACUUM the rows will be renumbered. You can avoid that with: > > I can create my own INTEGER PRIMARY KEY column, which becomes an alias for > the ROWID, but is there a way I can get the 'original' (I don't want to add > a column at this stage)? If you use your own INTEGER PRIMARY KEY then it becomes the ROWID and it will not change upon vacuum. > > If I call sqlite3_get_table(), it returns that ***result array (I'm using > C++), but AFAIK that doesn't contain the ROWID. > Just request it explicitly: SELECT ROWID, * FROM table_name; Derrell _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users