可能重複:
Is there a combination of 「LIKE」 and 「IN」 in SQL?怎麼樣,並在查詢中使用
,我們可以像使用,並在相同的查詢條件類似這樣的
select inticap(last_name),length(last_name) from employees
where last_name in(like '%J%',like '%A%',like '%M%');
OR
select inticap(last_name),length(last_name) from employees
where last_name like in('%J%', '%A%',l'%M%');
我知道這不會工作。在這裏,我想顯示姓氏首字母和姓氏的長度,我想顯示帶有字母'A','J'和'M'的名字。請幫我
http://stackoverflow.com/questions/4335359/is-it-possible-to-use-like-and-in-for-a-where-statment和http://stackoverflow.com/questions/10747996/in-sql-server-how-do-i-search-for-multiple-values-in-a-where-i-need-to-u/10748091#10748091和許多其他人 –
不是贏得'您可以在像last_name這樣的查詢中使用OR,如'%J%'或者像'%A%' – shobhit
這是不可能的。 –