Skip to content

删除字符串的某一部分,替换字符串的某一部分

用 replace(referer,http_type) 函数把字符串中 referer 中的 http_type 删掉, 用 replace(referer,http_type,http_method) 函数把字符串中 referer 中的 http_type 替换为 http_method, 用表格展示

SQL
|
select
  replace(referer,http_type) as "把字符串中 referer 中的 http_type 删掉",
  replace(referer,http_type,http_method) as "把字符串中 referer 中的 http_type 替换为 http_method"

SQL查询结果样例:

样例图片