MySql的sql语句学习之instr()字符查找函数的应用:

    INSTR(str,substr)    str:从哪个字符串中搜寻    substr:要搜寻的子字符串    instr()函数不辨别大小写
  1. instr(colName,string1)查问列名蕴含字符串1的后果,e.g,
    select userName from t_user_info where userName like concat("%",'江苏',"%");

    select userName from t_user_info where instr(userName,'江苏');
    select userName from t_user_info where instr(userName,'江苏')>0;
    查问后果雷同
  2. SELECT INSTR(string1,string2)在string1中查找string2字符串并输入下标,e.g,

https://www.cnblogs.com/mr-wuxiansheng/p/6531221.html