Gerry Snyder wrote:
> I am not sure what all this means when taken together.
> 
> It sounds as if defining  id  as shown above is unnecessary, since it is 
> just an alias for ROWID, and if one is stable the other has to be. Correct?
> 
> So now I can't interpret  "ROWID can change" as meaning anything other 
> than "the ROWID supplied by SQLite while doing an insertion, if none is 
> supplied by the user, can change at any time." Is this correct?
> 
> My little Tcl/Tk routines for displaying and managing SQLite files have 
> always assumed ROWID is a safe stable way of determining a row. Have I 
> missed something? (again?)

If you want to truly be safe, then *never* use ROWID (that is, ignore its 
existence), and *always* declare your own primary key, even if that is just 
an integer, and always reference your explicit primary key rather than 
ROWID.  This way, what columns exist and their values are always controlled 
by you, and moreover your schemata would then be more portable between 
different DBMSs. -- Darren Duncan
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to