Black, Michael (IS) wrote: > select * from table where rowid=max(rowid);
$ sqlite3 m2d1.sql3 -- Loading resources from /home/sk/.sqliterc SQLite version 3.7.3 Enter ".help" for instructions Enter SQL statements terminated with a ";" > .tables t1 t2 t3 > .schema t1 CREATE TABLE t1(id INT,data TEXT); > select * from t1 ; id data ---------- ---------- 1 one 2 two 3 tre > select * from t1 where rowid = max( rowid ) ; Error: misuse of aggregate function max() > select max( rowid ) from t1 ; max( rowid ) ------------ 3 -- Stanley C. Kitching Human Being Phoenix, Arizona _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users