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