LOCATE(substr,str)

返回子串substr在字符串str第一个出现的位置,如果substr不是在str里面,返回0.

    mysql> select LOCATE('bar', 'foobarbar');  
    -> 4  
    mysql> select LOCATE('xbar', 'foobar');  
    -> 0

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2021-08-10
猜你喜欢
  • 2022-02-11
  • 2021-06-27
  • 2022-02-06
  • 2021-12-28
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
相关资源
相似解决方案