MySQL LIKE IN()?

后端 未结 11 1689
时光说笑
时光说笑 2020-11-22 05:31

My current query looks like this:

SELECT * FROM fiberbox f WHERE f.fiberBox LIKE \'%1740 %\' OR f.fiberBox LIKE \'%1938 %\' OR f.fiberBox LIKE \'%1940 %\'
         


        
11条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 05:44

    This would be correct:

    SELECT * FROM table WHERE field regexp concat_ws("|",(
    "111",
    "222",
    "333"
    ));
    

提交回复
热议问题