Thanks for the replies. While I’m now on board as to what a NULL is I’m still a bit puzzled by the query planner.
Explain query plan select ID from Tbl where ID is null order by ID; returns SCAN TABLE Tbl USING COVERING INDEX ... It doesn’t even use the ID pk despite the fact it’s the requested order by?? > What has you checking an integer primary key for null anyway? David, to test something I needed a query that returned 0 rows and I modified the query I was already working on rather than type out a new select. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users