Last index of a given substring in MySQL

前端 未结 6 666
余生分开走
余生分开走 2020-12-02 16:27

We can find the index of the first occurrence of a given substring in MySQL using the INSTR() function as follows.

SELECT instr(\'Have_a_good_da         


        
6条回答
  •  爱一瞬间的悲伤
    2020-12-02 16:56

    I think you can use substring_index in this way:

    select substring_index(string, delimiter,-1)
    

    -1 will start at the end of the string.

提交回复
热议问题