首页 > 代码库 > POSITION(str1 IN str)

POSITION(str1 IN str)

POSITION(str1 IN str) 用于返回字符串 str1 在字符串 str 中的开始位置

mysql> SELECT POSITION(‘ball‘ IN ‘football‘);
+--------------------------------+
| POSITION(‘ball‘ IN ‘football‘) |
+--------------------------------+
| 5                              |
+--------------------------------+

 

 

 

    

POSITION(str1 IN str)