On Mon, Aug 22, 2011 at 10:08 AM, Black, Michael (IS) <michael.bla...@ngc.com> 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) a "misuse". Seems perfectly logical to me. Not for an > update but should work for select. I'm guessing that "max(rowid)" all by itself is either evaluating "rowid" as a variable or value independent of a table, or failing entirely because there is no context for evaluating rowid in the failing instance. Brad _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users