On Mon, Aug 22, 2011 at 4:01 PM, Cousin Stanley <cousinstan...@gmail.com>wrote:

> > select * from t1 where rowid = max( rowid ) ;
> Error: misuse of aggregate function max()
>

That can be rewritten as:

> select * from t1 order by rowid desc limit 1;

sqlite3 guarantees that the rowid only increments, never decrements. If the
rowid limit is ever hit (very unlikely to happen!) you'll get a "db full"
error, in which case it's probably time to recreate the table to get the
rowid to start counting at 1 again.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to