comma separated argument for IN operator, MySQL

前端 未结 2 457
滥情空心
滥情空心 2021-01-21 05:56

I have a table in which the following query works fine:

select * 
from session_actions 
where action_type IN (\'login_failed\',\'channel_recorded\')
         


        
2条回答
  •  不知归路
    2021-01-21 06:31

    You might be looking for FIND_IN_SET() function.

    select * 
    from session_actions 
    where find_in_set(`action_type`,'login_failed,channel_recorded');
    

    SAMPLE FIDDLE

提交回复
热议问题