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

 

在使用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.

猜你喜欢

转载自blog.csdn.net/qq_30117591/article/details/82936529
今日推荐