简体   繁体   English

在mysql字段中的第一个#之前删除所有内容

[英]Remove everything before first # in mysql field

Excuse my ignorance. 请原谅我的无知。

I need to replace all data in a mysql field before and including the first # . 我需要替换mysql字段中的所有数据,包括第一个#。

example field = golfers 示例字段=高尔夫球手

data at the first hole the golfer missed a 9 inch putt and said "#hit it bad 高尔夫球手在第一个洞的数据丢失了9英寸推杆,并说“ #hit it bad

new data hit it bad 新数据不好

update table set new_column_name = substring(column_name, instr(column_name, '#') + 1);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM