Re: [sqlite] EXT :Re: Last record in db

2011-08-22 Thread Igor Tandetnik
sreekumar...@gmail.com wrote: > How does sqlite insert a record ? More specifically how does sqlite update > the B-tree with the new record . Is there a linkage > made between the newly inserted record and the previous one ? http://www.sqlite.org/autoinc.html -- Igor Tandetnik

Re: [sqlite] EXT :Re: Last record in db

2011-08-22 Thread sreekumar . tp
lav...@bigfraud.org> Sender: sqlite-users-boun...@sqlite.org Date: Mon, 22 Aug 2011 17:32:51 To: General Discussion of SQLite Database<sqlite-users@sqlite.org> Reply-To: General Discussion of SQLite Database <sqlite-users@sqlite.org> Subject: Re: [sqlite] EXT :Re: Last record in d

Re: [sqlite] EXT :Re: Last record in db

2011-08-22 Thread Simon Slavin
On 22 Aug 2011, at 5:13pm, Igor Tandetnik wrote: > On 8/22/2011 9:52 AM, Black, Michael (IS) wrote: >> No...if you use autoincrement you can guarantee that "last" will be the last >> record inserted. > > There's no contradiction. "Last" is still defined only for ordered sets > - you just

Re: [sqlite] EXT :Re: Last record in db

2011-08-22 Thread Igor Tandetnik
On 8/22/2011 9:52 AM, Black, Michael (IS) wrote: > No...if you use autoincrement you can guarantee that "last" will be the last > record inserted. There's no contradiction. "Last" is still defined only for ordered sets - you just chose a particular ordering, by rowid. -- Igor Tandetnik

Re: [sqlite] EXT :Re: Last record in db

2011-08-22 Thread Brad Stiles
On Mon, Aug 22, 2011 at 10:08 AM, Black, Michael (IS) wrote: > Brad got it: >> select * from t1 where rowid = max( rowid ) ; >> Error: misuse of aggregate function max() > sqlite> select * from t1 where rowid = (select max(rowid) from t1); > 3|three > > Why is max(rowid)

Re: [sqlite] EXT :Re: Last record in db

2011-08-22 Thread Black, Michael (IS)
s Directorate From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Brad Stiles [bradley.sti...@gmail.com] Sent: Monday, August 22, 2011 9:04 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] Last record in db

Re: [sqlite] EXT :Re: Last record in db

2011-08-22 Thread Black, Michael (IS)
te.org [sqlite-users-boun...@sqlite.org] on behalf of sreekumar...@gmail.com [sreekumar...@gmail.com] Sent: Monday, August 22, 2011 8:28 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] Last record in db Is 'last' valid only for 'ordered' set of records? --Original Mess