'LIKE ('%this%' OR '%that%') and something=else' not working

前端 未结 7 1390
南方客
南方客 2020-12-15 14:53

I have a select query where I am trying to search strings for multiple patterns

LIKE (\'%this%\' or \'%that%\' ) and something=else

Returns

7条回答
  •  一整个雨季
    2020-12-15 15:42

    Break out the LIKE clauses into 2 separate statements, i.e.:

    (fieldname1 LIKE '%this%' or fieldname1 LIKE '%that%' ) and something=else
    

提交回复
热议问题