我目前正在运行的查询是这样的:有没有办法在MySQL中结合IN和LIKE?
SELECT *
FROM email
WHERE email_address LIKE '[email protected]%'
OR email_address LIKE '[email protected]%'
OR email_address LIKE '[email protected]%'
的大量OR
的困扰我。有没有办法用一个IN
操作一个类似于此凝结起来,例如:
SELECT *
FROM email
WHERE email_address LIKE ('[email protected]%', '[email protected]%', '[email protected]%')
或者这只是一厢情愿的想法?
是的,有一些东西:http://stackoverflow.com/questions/1127088/mysql-like-in – 2010-05-24 20:32:07