SQL SELECT everything after a certain character

前端 未结 6 2007
广开言路
广开言路 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:03

    In MySQL, this works if there are multiple '=' characters in the string

    SUBSTRING(supplier_reference FROM (LOCATE('=',supplier_reference)+1))
    

    It returns the substring after(+1) having found the the first =

提交回复
热议问题