I have “SELECT … WHERE column LIKE ‘i12.3%’ OR column LIKE ‘i4.5%’ OR column LIKE ‘i16.7%’ OR …
I’m looking for something like
column in ('i12.3%', 'i4.5%', 'i6,7%')
but “in” doesn’t work with wildcards
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I do not think there is an alternative, and I understand that since your query has multiple ORs, it will be slow. You might be able to optimize things a bit by nesting inside it another query which first selects only those rows that match
LIKE 'i%'.