replace

description

Syntax

VARCHAR REPLACE (VARCHAR str, VARCHAR old, VARCHAR new)

replace all old substring with new substring in str

example

  1. mysql> select replace("http://www.baidu.com:9090", "9090", "");
  2. +------------------------------------------------------+
  3. | replace('http://www.baidu.com:9090', '9090', '') |
  4. +------------------------------------------------------+
  5. | http://www.baidu.com: |
  6. +------------------------------------------------------+

keyword

REPLACE