在使用sql语句中难免要查找某个字符在一个字符串中的位置,在mysql中,mysql:positon(substr,str) 返回子串substr在str中第一次出现的位置。 在sqllite中,instr(ori_str,sub_str)函数也可以完成这个功能。

instr(ori_str,sub_str)

Name Description
ori_str The string to be searched.
sub_str The string to be searched for within the ori_str.

 

SQLite instr() function查找字符串位置

 

 

 

 

instr(ori_str,sub_str)

Name Description
ori_str The string to be searched.
sub_str The string to be searched for within the ori_str.

 

 

SQLite instr() function查找字符串位置

 

 

 

 

相关文章:

  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2022-02-15
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-09
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2021-09-01
  • 2022-01-14
  • 2021-07-09
相关资源
相似解决方案