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); On 2 July 2011 10:21, yogibabu <madra...@interia.pl> wrote: > > consider this: > SELECT * FROM table_name WHERE column_name in(1,2,3) or column_name is > NULL > > Here column name is referenced two times. > Putting it this way: > SELECT * FROM table_name WHERE column_name in(1,2,3,null) > causes that in() ignores null value without giving any error. > > I need to add last part of this query to a function that must be column_name > agnostic, so that is a reason that otherwise simple workaround is out of > question here. > -- > View this message in context: > http://old.nabble.com/How-to-search-for-multiple-values-in-a-column-including-null-without-repeating-column-name---tp31978469p31978469.html > Sent from the SQLite mailing list archive at Nabble.com. > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users