Vitali Kiruta <[email protected]> wrote: > If you know for sure column_name won't contain a certain value, for > example -1, you could do something like this. > > select * from table_name where coalesce(column_name, -1) in (1,2,3,-1);
And if you don't, you can just pick one of the values already in the list: select * from table_name where coalesce(column_name, 1) in (1,2,3); Note that, in either case, SQLite won't be able to use an index on column_name (assuming you have one), whereas in the original query it may. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

