SQL SELECT everything after a certain character

前端 未结 6 1987
广开言路
广开言路 2021-01-31 16:02

I need to extract everything after the last \'=\' (http://www.domain.com?query=blablabla - > blablabla) but this query returns the entire strings. Where did I go wrong in here:<

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-31 16:16

    select SUBSTRING_INDEX(supplier_reference,'=',-1) from ps_product;
    

    Please use http://www.w3resource.com/mysql/string-functions/mysql-substring_index-function.php for further reference.

提交回复
热议问题