I thought we were answering the question "how can I retrive the last row" -- 
though we never got a definition of what "last" meant.  I assumed "last 
inserted".



Sure you can construct an example that doesn't work.  But he didn't ask how NOT 
to do it.



Don't you agree that using autoincrement properly guarantees retrieving the 
last inserted row?  Or are you maintaining that is a false statement?  I'd like 
to see an example to disprove it if you maintain that its false.



Michael D. Black

Senior Scientist

NG Information Systems

Advanced Analytics Directorate



________________________________
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Igor Tandetnik [itandet...@mvps.org]
Sent: Monday, August 22, 2011 1:14 PM
To: sqlite-users@sqlite.org
Subject: EXT :Re: [sqlite] Last record in db

On 8/22/2011 1:56 PM, Black, Michael (IS) wrote:
> Ahhh...you didn't let autoincrement do it's job...

Yes, quite intentionally, in order to emphasize the point that "record
with the largest rowid" and "record inserted most recently" are not
necessarily one and the same, whether or not AUTOINCREMENT was specified
when the table was created.

Of course it's possible to construct an example where the same record is
both most recently inserted and has the largest rowid. But it's also
possible to construct an example where these are two different records.
--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to