AM
2008-02-05 16:40:55 UTC
That is,
select * from my_table where name like ('ABC%','DEF%',...);
I know the above query is not possible. But how do I write a query to select rows that match multiple patterns.
I know we cant use "IN" since it needs exact matches. LIKE only takes a single pattern. I dont want to use sub queries since the input from the user will be dynamic(any number of names)- so I do not want to hardcode the query. Any ideas?