search

Home  >  Q&A  >  body text

php - Processing of reverse LIKE of sql statement

It is normal to use LIKE in SQL statements
But is there any reverse LIKE syntax?
That is to say, it is not the field that contains the string, but the string that contains the field content.
Find out the conditions that meet the conditions.
Please help me!

阿神阿神2742 days ago589

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-05-24 11:35:03

    SELECT *
      FROM 表
     WHERE '字符串' LIKE CONCAT('%',字段,'%')

    reply
    0
  • Cancelreply