SELECT * FROM abc WHERE column1 IN (a1,b1,c1)
I want to use LIKE with this select query; how can I write LIKE statement with IN, similar to the que
As the other folks say you can use a list of OR conditions to specify the conditions.
You can also use a temporary table or subquery in the from clause. Here is an example of the subquery in the from clause:
select column1
from abc
, table(
(select 'a%' as term from SYSIBM.SYSDUMMY1)
union all
(select 'b%' from SYSIBM.SYSDUMMY1)
union all
(select 'c%' from SYSIBM.SYSDUMMY1)
) search_list
where abc.column1 like search_list.term;